Add user_gesture parameter to OnBeforeBrowse (issue #1526)

This commit is contained in:
Felix Bruns
2018-04-27 15:11:53 +00:00
committed by Marshall Greenblatt
parent 0677d0d9de
commit 4b33c17533
15 changed files with 46 additions and 11 deletions

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=fbd234d6060aadc1bf5ee0efce5d8cb2c4a0e022$
// $hash=83e35477036fe71704286b8089535e8787edf2c3$
//
#include "libcef_dll/ctocpp/request_handler_ctocpp.h"
@@ -30,6 +30,7 @@
bool CefRequestHandlerCToCpp::OnBeforeBrowse(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request,
bool user_gesture,
bool is_redirect) {
cef_request_handler_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, on_before_browse))
@@ -53,7 +54,7 @@ bool CefRequestHandlerCToCpp::OnBeforeBrowse(CefRefPtr<CefBrowser> browser,
// Execute
int _retval = _struct->on_before_browse(
_struct, CefBrowserCppToC::Wrap(browser), CefFrameCppToC::Wrap(frame),
CefRequestCppToC::Wrap(request), is_redirect);
CefRequestCppToC::Wrap(request), user_gesture, is_redirect);
// Return type: bool
return _retval ? true : false;

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=cde69cb97f29cb75da85bb709470f73d9e57f5bc$
// $hash=f8849fecaa6e2a36280b9c71b37bdfbe1600fb06$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_HANDLER_CTOCPP_H_
@@ -37,6 +37,7 @@ class CefRequestHandlerCToCpp
bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request,
bool user_gesture,
bool is_redirect) override;
bool OnOpenURLFromTab(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,