mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Restore CefRenderProcessHandler::OnBeforeNavigation (issue #1076). This method is still needed for some use cases due to issue #1129.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1519 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -94,6 +94,17 @@ typedef struct _cef_render_process_handler_t {
|
||||
struct _cef_load_handler_t* (CEF_CALLBACK *get_load_handler)(
|
||||
struct _cef_render_process_handler_t* self);
|
||||
|
||||
///
|
||||
// Called before browser navigation. Return true (1) to cancel the navigation
|
||||
// or false (0) to allow the navigation to proceed. The |request| object
|
||||
// cannot be modified in this callback.
|
||||
///
|
||||
int (CEF_CALLBACK *on_before_navigation)(
|
||||
struct _cef_render_process_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
||||
struct _cef_request_t* request,
|
||||
enum cef_navigation_type_t navigation_type, int is_redirect);
|
||||
|
||||
///
|
||||
// Called immediately after the V8 context for a frame has been created. To
|
||||
// retrieve the JavaScript 'window' object use the
|
||||
|
@@ -55,6 +55,8 @@
|
||||
/*--cef(source=client)--*/
|
||||
class CefRenderProcessHandler : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_navigation_type_t NavigationType;
|
||||
|
||||
///
|
||||
// Called after the render process main thread has been created. |extra_info|
|
||||
// is a read-only value originating from
|
||||
@@ -92,6 +94,18 @@ class CefRenderProcessHandler : public virtual CefBase {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
///
|
||||
// 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.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnBeforeNavigation(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefRequest> request,
|
||||
NavigationType navigation_type,
|
||||
bool is_redirect) { return false; }
|
||||
|
||||
///
|
||||
// Called immediately after the V8 context for a frame has been created. To
|
||||
// retrieve the JavaScript 'window' object use the CefV8Context::GetGlobal()
|
||||
|
@@ -1479,6 +1479,18 @@ enum cef_focus_source_t {
|
||||
FOCUS_SOURCE_SYSTEM,
|
||||
};
|
||||
|
||||
///
|
||||
// Navigation types.
|
||||
///
|
||||
enum cef_navigation_type_t {
|
||||
NAVIGATION_LINK_CLICKED = 0,
|
||||
NAVIGATION_FORM_SUBMITTED,
|
||||
NAVIGATION_BACK_FORWARD,
|
||||
NAVIGATION_RELOAD,
|
||||
NAVIGATION_FORM_RESUBMITTED,
|
||||
NAVIGATION_OTHER,
|
||||
};
|
||||
|
||||
///
|
||||
// Supported XML encoding types. The parser supports ASCII, ISO-8859-1, and
|
||||
// UTF16 (LE and BE) by default. All other types must be translated to UTF8
|
||||
|
Reference in New Issue
Block a user