mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add new CefRenderProcessHandler::OnBeforeNavigation callback (issue #722).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@904 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -52,11 +52,28 @@ class ClientApp : public CefApp,
|
||||
virtual void OnWebKitInitialized(CefRefPtr<ClientApp> app) {
|
||||
}
|
||||
|
||||
// Called after a browser has been created.
|
||||
virtual void OnBrowserCreated(CefRefPtr<ClientApp> app,
|
||||
CefRefPtr<CefBrowser> browser) {
|
||||
}
|
||||
|
||||
// Called before a browser is destroyed.
|
||||
virtual void OnBrowserDestroyed(CefRefPtr<ClientApp> app,
|
||||
CefRefPtr<CefBrowser> browser) {
|
||||
}
|
||||
|
||||
// Called before browser navigation. Return true to cancel the navigation or
|
||||
// false to allow the navigation to proceed. The |request| object cannot be
|
||||
// modified in this callback.
|
||||
virtual bool OnBeforeNavigation(CefRefPtr<ClientApp> app,
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefRequest> request,
|
||||
cef_navigation_type_t navigation_type,
|
||||
bool is_redirect) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Called when a V8 context is created. Used to create V8 window bindings
|
||||
// and set message callbacks. RenderDelegates should check for unique URLs
|
||||
// to avoid interfering with each other.
|
||||
@@ -168,7 +185,13 @@ class ClientApp : public CefApp,
|
||||
// CefRenderProcessHandler methods.
|
||||
virtual void OnRenderThreadCreated() OVERRIDE;
|
||||
virtual void OnWebKitInitialized() OVERRIDE;
|
||||
virtual void OnBrowserCreated(CefRefPtr<CefBrowser> browser) OVERRIDE;
|
||||
virtual void OnBrowserDestroyed(CefRefPtr<CefBrowser> browser) OVERRIDE;
|
||||
virtual bool OnBeforeNavigation(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefRequest> request,
|
||||
NavigationType navigation_type,
|
||||
bool is_redirect) OVERRIDE;
|
||||
virtual void OnContextCreated(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefV8Context> context) OVERRIDE;
|
||||
|
Reference in New Issue
Block a user