mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-05 03:32:37 +00:00
Add OnPluginCrashed to Request handler
This commit is contained in:
@@ -204,6 +204,15 @@ namespace CefSharp
|
||||
return handler->OnBeforePluginLoad(_browserControl, StringUtils::ToClr(url), StringUtils::ToClr(policy_url), wrapper);
|
||||
}
|
||||
|
||||
void ClientAdapter::OnPluginCrashed(CefRefPtr<CefBrowser> browser, const CefString& plugin_path)
|
||||
{
|
||||
IRequestHandler^ handler = _browserControl->RequestHandler;
|
||||
if (handler != nullptr)
|
||||
{
|
||||
handler->OnPluginCrashed(_browserControl, StringUtils::ToClr(plugin_path));
|
||||
}
|
||||
}
|
||||
|
||||
bool ClientAdapter::OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request)
|
||||
{
|
||||
// TOOD: Try to support with CEF3; seems quite difficult because the method signature has changed greatly with many parts
|
||||
|
||||
@@ -84,6 +84,7 @@ namespace CefSharp
|
||||
const CefString& host, int port, const CefString& realm, const CefString& scheme, CefRefPtr<CefAuthCallback> callback) OVERRIDE;
|
||||
virtual DECL bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request, bool isRedirect) OVERRIDE;
|
||||
virtual DECL bool OnBeforePluginLoad( CefRefPtr< CefBrowser > browser, const CefString& url, const CefString& policy_url, CefRefPtr< CefWebPluginInfo > info ) OVERRIDE;
|
||||
virtual DECL void OnPluginCrashed(CefRefPtr<CefBrowser> browser, const CefString& plugin_path) OVERRIDE;
|
||||
|
||||
// CefDisplayHandler
|
||||
virtual DECL void OnLoadingStateChange(CefRefPtr<CefBrowser> browser, bool isLoading, bool canGoBack, bool canGoForward) OVERRIDE;
|
||||
|
||||
@@ -272,6 +272,11 @@ namespace CefSharp.Example
|
||||
return false;
|
||||
}
|
||||
|
||||
void IRequestHandler.OnPluginCrashed(IWebBrowser browser, string pluginPath)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool IRequestHandler.OnBeforeResourceLoad(IWebBrowser browser, IRequestResponse requestResponse)
|
||||
{
|
||||
IRequest request = requestResponse.Request;
|
||||
|
||||
@@ -26,6 +26,13 @@ namespace CefSharp
|
||||
/// <returns>Return true to cancel the navigation or false to allow the navigation to proceed.</returns>
|
||||
bool OnBeforeBrowse(IWebBrowser browser, IRequest request, bool isRedirect);
|
||||
|
||||
/// <summary>
|
||||
/// Called when a plugin has crashed
|
||||
/// </summary>
|
||||
/// <param name="browser">the browser object</param>
|
||||
/// <param name="pluginPath">path of the plugin that crashed</param>
|
||||
void OnPluginCrashed(IWebBrowser browser, string pluginPath);
|
||||
|
||||
/// <summary>
|
||||
/// Called before a resource request is loaded.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user