Reputation: 241
I am using CEF browser in my app. Now my issue is following.
You can for example create you own handler for file download dialog by this way.
browser.DownloadHandler = new MyOwnDownloadHandler();
Now MyOwnDownloadHandler have to implemet IDownloadHanler interface, which is following:
public interface IDownloadHandler
{
void OnBeforeDownload(IBrowser browser, DownloadItem downloadItem, IBeforeDownloadCallback callback);
void OnDownloadUpdated(IBrowser browser, DownloadItem downloadItem, IDownloadItemCallback callback);
}
Now this is nice, I can do my own file download dialog and some other magic there. The problem I am facing is that I do not want to use this handler all the time. I want to switch between my handler and default handler. There is obviously some default handler, but I do not know how to restore it and disable mine.
How can I do this ? I cannot simply use += and -= to unsubscribe event.
Upvotes: 0
Views: 95