Ejemplo n.º 1
0
        private void on_before_download(cef_download_handler_t *self, cef_browser_t *browser, cef_download_item_t *download_item, cef_string_t *suggested_name, cef_before_download_callback_t *callback)
        {
            CheckSelf(self);

            var m_browser        = CefBrowser.FromNative(browser);
            var m_download_item  = CefDownloadItem.FromNative(download_item);
            var m_suggested_name = cef_string_t.ToString(suggested_name);
            var m_callback       = CefBeforeDownloadCallback.FromNative(callback);

            OnBeforeDownload(m_browser, m_download_item, m_suggested_name, m_callback);

            m_download_item.Dispose();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Called before a download begins. |suggested_name| is the suggested name for
 /// the download file. By default the download will be canceled. Execute
 /// |callback| either asynchronously or in this method to continue the download
 /// if desired. Do not keep a reference to |download_item| outside of this
 /// method.
 /// </summary>
 protected virtual void OnBeforeDownload(CefBrowser browser, CefDownloadItem downloadItem, string suggestedName, CefBeforeDownloadCallback callback)
 {
 }
 protected override void OnBeforeDownload(CefBrowser browser, CefDownloadItem downloadItem, string suggestedName, CefBeforeDownloadCallback callback)
 {
     callback.Continue(suggestedName, true);
     base.OnBeforeDownload(browser, downloadItem, suggestedName, callback);
     webBrowser.OnBeforeDownload();
 }
 /// <summary>
 /// Called before a download begins. |suggested_name| is the suggested name for
 /// the download file. By default the download will be canceled. Execute
 /// |callback| either asynchronously or in this method to continue the download
 /// if desired. Do not keep a reference to |download_item| outside of this
 /// method.
 /// </summary>
 protected virtual void OnBeforeDownload(CefBrowser browser, CefDownloadItem downloadItem, string suggestedName, CefBeforeDownloadCallback callback)
 {
 }