2017-01-11 00:00:30 +01:00
|
|
|
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
|
2012-04-03 03:34:16 +02:00
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
//
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// This file was generated by the CEF translator tool. If making changes by
|
|
|
|
// hand only do so within the body of existing method and function
|
|
|
|
// implementations. See the translator.README.txt file in the tools directory
|
|
|
|
// for more information.
|
|
|
|
//
|
2017-07-27 01:19:27 +02:00
|
|
|
// $hash=fc5f3eef3a1ac0e650a08fd0b63fdf834c3bc99f$
|
2017-05-17 11:29:28 +02:00
|
|
|
//
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
#include "libcef_dll/cpptoc/request_handler_cpptoc.h"
|
|
|
|
#include "libcef_dll/cpptoc/resource_handler_cpptoc.h"
|
2015-12-05 03:58:56 +01:00
|
|
|
#include "libcef_dll/cpptoc/response_filter_cpptoc.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
#include "libcef_dll/ctocpp/auth_callback_ctocpp.h"
|
|
|
|
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
|
|
|
#include "libcef_dll/ctocpp/frame_ctocpp.h"
|
2015-04-02 17:21:46 +02:00
|
|
|
#include "libcef_dll/ctocpp/request_callback_ctocpp.h"
|
2017-05-17 11:29:28 +02:00
|
|
|
#include "libcef_dll/ctocpp/request_ctocpp.h"
|
2015-03-11 19:44:11 +01:00
|
|
|
#include "libcef_dll/ctocpp/response_ctocpp.h"
|
2016-10-27 19:57:12 +02:00
|
|
|
#include "libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.h"
|
2017-05-17 11:29:28 +02:00
|
|
|
#include "libcef_dll/ctocpp/sslinfo_ctocpp.h"
|
2016-10-27 19:57:12 +02:00
|
|
|
#include "libcef_dll/ctocpp/x509certificate_ctocpp.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
namespace {
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
// MEMBER FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
int CEF_CALLBACK
|
|
|
|
request_handler_on_before_browse(struct _cef_request_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame,
|
|
|
|
cef_request_t* request,
|
|
|
|
int is_redirect) {
|
2013-09-12 19:44:54 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return 0;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return 0;
|
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame);
|
|
|
|
if (!frame)
|
|
|
|
return 0;
|
|
|
|
// Verify param: request; type: refptr_diff
|
|
|
|
DCHECK(request);
|
|
|
|
if (!request)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefRequestHandlerCppToC::Get(self)->OnBeforeBrowse(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame),
|
|
|
|
CefRequestCToCpp::Wrap(request), is_redirect ? true : false);
|
2013-09-12 19:44:54 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2015-03-09 21:22:31 +01:00
|
|
|
int CEF_CALLBACK request_handler_on_open_urlfrom_tab(
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_request_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame,
|
|
|
|
const cef_string_t* target_url,
|
|
|
|
cef_window_open_disposition_t target_disposition,
|
|
|
|
int user_gesture) {
|
2015-03-09 21:22:31 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return 0;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return 0;
|
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame);
|
|
|
|
if (!frame)
|
|
|
|
return 0;
|
|
|
|
// Verify param: target_url; type: string_byref_const
|
|
|
|
DCHECK(target_url);
|
|
|
|
if (!target_url)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefRequestHandlerCppToC::Get(self)->OnOpenURLFromTab(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame),
|
|
|
|
CefString(target_url), target_disposition, user_gesture ? true : false);
|
2015-03-09 21:22:31 +01:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_return_value_t CEF_CALLBACK
|
|
|
|
request_handler_on_before_resource_load(struct _cef_request_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame,
|
|
|
|
cef_request_t* request,
|
|
|
|
cef_request_callback_t* callback) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
2015-04-02 17:21:46 +02:00
|
|
|
return RV_CONTINUE;
|
2012-04-03 03:34:16 +02:00
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
2015-04-02 17:21:46 +02:00
|
|
|
return RV_CONTINUE;
|
2012-04-03 03:34:16 +02:00
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame);
|
|
|
|
if (!frame)
|
2015-04-02 17:21:46 +02:00
|
|
|
return RV_CONTINUE;
|
2012-04-03 03:34:16 +02:00
|
|
|
// Verify param: request; type: refptr_diff
|
|
|
|
DCHECK(request);
|
|
|
|
if (!request)
|
2015-04-02 17:21:46 +02:00
|
|
|
return RV_CONTINUE;
|
|
|
|
// Verify param: callback; type: refptr_diff
|
|
|
|
DCHECK(callback);
|
|
|
|
if (!callback)
|
|
|
|
return RV_CONTINUE;
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_return_value_t _retval =
|
|
|
|
CefRequestHandlerCppToC::Get(self)->OnBeforeResourceLoad(
|
|
|
|
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame),
|
|
|
|
CefRequestCToCpp::Wrap(request),
|
|
|
|
CefRequestCallbackCToCpp::Wrap(callback));
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2015-04-02 17:21:46 +02:00
|
|
|
// Return type: simple
|
2012-04-03 03:34:16 +02:00
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_resource_handler_t* CEF_CALLBACK
|
|
|
|
request_handler_get_resource_handler(struct _cef_request_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame,
|
|
|
|
cef_request_t* request) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return NULL;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return NULL;
|
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame);
|
|
|
|
if (!frame)
|
|
|
|
return NULL;
|
|
|
|
// Verify param: request; type: refptr_diff
|
|
|
|
DCHECK(request);
|
|
|
|
if (!request)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRefPtr<CefResourceHandler> _retval =
|
|
|
|
CefRequestHandlerCppToC::Get(self)->GetResourceHandler(
|
|
|
|
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame),
|
|
|
|
CefRequestCToCpp::Wrap(request));
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefResourceHandlerCppToC::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
request_handler_on_resource_redirect(struct _cef_request_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame,
|
|
|
|
cef_request_t* request,
|
|
|
|
struct _cef_response_t* response,
|
|
|
|
cef_string_t* new_url) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return;
|
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame);
|
|
|
|
if (!frame)
|
|
|
|
return;
|
2015-03-11 19:44:11 +01:00
|
|
|
// Verify param: request; type: refptr_diff
|
|
|
|
DCHECK(request);
|
|
|
|
if (!request)
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
2016-08-24 15:19:57 +02:00
|
|
|
// Verify param: response; type: refptr_diff
|
|
|
|
DCHECK(response);
|
|
|
|
if (!response)
|
|
|
|
return;
|
2012-04-03 03:34:16 +02:00
|
|
|
// Verify param: new_url; type: string_byref
|
|
|
|
DCHECK(new_url);
|
|
|
|
if (!new_url)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Translate param: new_url; type: string_byref
|
|
|
|
CefString new_urlStr(new_url);
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRequestHandlerCppToC::Get(self)->OnResourceRedirect(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame),
|
|
|
|
CefRequestCToCpp::Wrap(request), CefResponseCToCpp::Wrap(response),
|
2012-04-03 03:34:16 +02:00
|
|
|
new_urlStr);
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
int CEF_CALLBACK
|
|
|
|
request_handler_on_resource_response(struct _cef_request_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame,
|
|
|
|
cef_request_t* request,
|
|
|
|
struct _cef_response_t* response) {
|
2015-03-11 19:44:11 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return 0;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return 0;
|
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame);
|
|
|
|
if (!frame)
|
|
|
|
return 0;
|
|
|
|
// Verify param: request; type: refptr_diff
|
|
|
|
DCHECK(request);
|
|
|
|
if (!request)
|
|
|
|
return 0;
|
|
|
|
// Verify param: response; type: refptr_diff
|
|
|
|
DCHECK(response);
|
|
|
|
if (!response)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefRequestHandlerCppToC::Get(self)->OnResourceResponse(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame),
|
|
|
|
CefRequestCToCpp::Wrap(request), CefResponseCToCpp::Wrap(response));
|
2015-03-11 19:44:11 +01:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_response_filter_t* CEF_CALLBACK
|
|
|
|
request_handler_get_resource_response_filter(
|
|
|
|
struct _cef_request_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame,
|
|
|
|
cef_request_t* request,
|
2015-12-05 03:58:56 +01:00
|
|
|
struct _cef_response_t* response) {
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return NULL;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return NULL;
|
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame);
|
|
|
|
if (!frame)
|
|
|
|
return NULL;
|
|
|
|
// Verify param: request; type: refptr_diff
|
|
|
|
DCHECK(request);
|
|
|
|
if (!request)
|
|
|
|
return NULL;
|
|
|
|
// Verify param: response; type: refptr_diff
|
|
|
|
DCHECK(response);
|
|
|
|
if (!response)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRefPtr<CefResponseFilter> _retval =
|
|
|
|
CefRequestHandlerCppToC::Get(self)->GetResourceResponseFilter(
|
|
|
|
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame),
|
|
|
|
CefRequestCToCpp::Wrap(request), CefResponseCToCpp::Wrap(response));
|
2015-12-05 03:58:56 +01:00
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefResponseFilterCppToC::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
request_handler_on_resource_load_complete(struct _cef_request_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame,
|
|
|
|
cef_request_t* request,
|
|
|
|
struct _cef_response_t* response,
|
|
|
|
cef_urlrequest_status_t status,
|
|
|
|
int64 received_content_length) {
|
2015-12-04 19:59:14 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return;
|
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame);
|
|
|
|
if (!frame)
|
|
|
|
return;
|
|
|
|
// Verify param: request; type: refptr_diff
|
|
|
|
DCHECK(request);
|
|
|
|
if (!request)
|
|
|
|
return;
|
|
|
|
// Verify param: response; type: refptr_diff
|
|
|
|
DCHECK(response);
|
|
|
|
if (!response)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRequestHandlerCppToC::Get(self)->OnResourceLoadComplete(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame),
|
|
|
|
CefRequestCToCpp::Wrap(request), CefResponseCToCpp::Wrap(response),
|
|
|
|
status, received_content_length);
|
2015-12-04 19:59:14 +01:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
int CEF_CALLBACK
|
|
|
|
request_handler_get_auth_credentials(struct _cef_request_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame,
|
|
|
|
int isProxy,
|
|
|
|
const cef_string_t* host,
|
|
|
|
int port,
|
|
|
|
const cef_string_t* realm,
|
|
|
|
const cef_string_t* scheme,
|
|
|
|
cef_auth_callback_t* callback) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return 0;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return 0;
|
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame);
|
|
|
|
if (!frame)
|
|
|
|
return 0;
|
|
|
|
// Verify param: host; type: string_byref_const
|
|
|
|
DCHECK(host);
|
|
|
|
if (!host)
|
|
|
|
return 0;
|
|
|
|
// Verify param: callback; type: refptr_diff
|
|
|
|
DCHECK(callback);
|
|
|
|
if (!callback)
|
|
|
|
return 0;
|
2015-12-17 19:24:14 +01:00
|
|
|
// Unverified params: realm, scheme
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefRequestHandlerCppToC::Get(self)->GetAuthCredentials(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame),
|
|
|
|
isProxy ? true : false, CefString(host), port, CefString(realm),
|
|
|
|
CefString(scheme), CefAuthCallbackCToCpp::Wrap(callback));
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
int CEF_CALLBACK
|
|
|
|
request_handler_on_quota_request(struct _cef_request_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
const cef_string_t* origin_url,
|
|
|
|
int64 new_size,
|
|
|
|
cef_request_callback_t* callback) {
|
2012-09-28 00:52:15 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return 0;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return 0;
|
|
|
|
// Verify param: origin_url; type: string_byref_const
|
|
|
|
DCHECK(origin_url);
|
|
|
|
if (!origin_url)
|
|
|
|
return 0;
|
|
|
|
// Verify param: callback; type: refptr_diff
|
|
|
|
DCHECK(callback);
|
|
|
|
if (!callback)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefRequestHandlerCppToC::Get(self)->OnQuotaRequest(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), CefString(origin_url), new_size,
|
2015-04-02 17:21:46 +02:00
|
|
|
CefRequestCallbackCToCpp::Wrap(callback));
|
2012-09-28 00:52:15 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
request_handler_on_protocol_execution(struct _cef_request_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
const cef_string_t* url,
|
|
|
|
int* allow_os_execution) {
|
2012-06-25 23:21:27 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return;
|
|
|
|
// Verify param: url; type: string_byref_const
|
|
|
|
DCHECK(url);
|
|
|
|
if (!url)
|
|
|
|
return;
|
|
|
|
// Verify param: allow_os_execution; type: bool_byref
|
|
|
|
DCHECK(allow_os_execution);
|
|
|
|
if (!allow_os_execution)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Translate param: allow_os_execution; type: bool_byref
|
2017-05-17 11:29:28 +02:00
|
|
|
bool allow_os_executionBool =
|
|
|
|
(allow_os_execution && *allow_os_execution) ? true : false;
|
2012-06-25 23:21:27 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRequestHandlerCppToC::Get(self)->OnProtocolExecution(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), CefString(url), allow_os_executionBool);
|
2012-06-25 23:21:27 +02:00
|
|
|
|
|
|
|
// Restore param: allow_os_execution; type: bool_byref
|
|
|
|
if (allow_os_execution)
|
2017-05-17 11:29:28 +02:00
|
|
|
*allow_os_execution = allow_os_executionBool ? true : false;
|
2012-06-25 23:21:27 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
int CEF_CALLBACK
|
|
|
|
request_handler_on_certificate_error(struct _cef_request_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_errorcode_t cert_error,
|
|
|
|
const cef_string_t* request_url,
|
|
|
|
struct _cef_sslinfo_t* ssl_info,
|
|
|
|
cef_request_callback_t* callback) {
|
2013-09-12 22:34:18 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return 0;
|
2015-02-11 19:15:04 +01:00
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return 0;
|
2013-09-12 22:34:18 +02:00
|
|
|
// Verify param: request_url; type: string_byref_const
|
|
|
|
DCHECK(request_url);
|
|
|
|
if (!request_url)
|
|
|
|
return 0;
|
2015-02-11 19:15:04 +01:00
|
|
|
// Verify param: ssl_info; type: refptr_diff
|
|
|
|
DCHECK(ssl_info);
|
|
|
|
if (!ssl_info)
|
|
|
|
return 0;
|
2013-09-12 22:34:18 +02:00
|
|
|
// Verify param: callback; type: refptr_diff
|
|
|
|
DCHECK(callback);
|
|
|
|
if (!callback)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefRequestHandlerCppToC::Get(self)->OnCertificateError(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), cert_error, CefString(request_url),
|
2015-02-11 19:15:04 +01:00
|
|
|
CefSSLInfoCToCpp::Wrap(ssl_info),
|
2015-04-02 17:21:46 +02:00
|
|
|
CefRequestCallbackCToCpp::Wrap(callback));
|
2013-09-12 22:34:18 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2016-10-27 19:57:12 +02:00
|
|
|
int CEF_CALLBACK request_handler_on_select_client_certificate(
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_request_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
int isProxy,
|
|
|
|
const cef_string_t* host,
|
|
|
|
int port,
|
|
|
|
size_t certificatesCount,
|
2016-10-27 19:57:12 +02:00
|
|
|
struct _cef_x509certificate_t* const* certificates,
|
|
|
|
cef_select_client_certificate_callback_t* callback) {
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return 0;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return 0;
|
|
|
|
// Verify param: host; type: string_byref_const
|
|
|
|
DCHECK(host);
|
|
|
|
if (!host)
|
|
|
|
return 0;
|
|
|
|
// Verify param: certificates; type: refptr_vec_diff_byref_const
|
|
|
|
DCHECK(certificatesCount == 0 || certificates);
|
|
|
|
if (certificatesCount > 0 && !certificates)
|
|
|
|
return 0;
|
|
|
|
// Verify param: callback; type: refptr_diff
|
|
|
|
DCHECK(callback);
|
|
|
|
if (!callback)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// Translate param: certificates; type: refptr_vec_diff_byref_const
|
2017-05-17 11:29:28 +02:00
|
|
|
std::vector<CefRefPtr<CefX509Certificate>> certificatesList;
|
2016-10-27 19:57:12 +02:00
|
|
|
if (certificatesCount > 0) {
|
|
|
|
for (size_t i = 0; i < certificatesCount; ++i) {
|
|
|
|
CefRefPtr<CefX509Certificate> certificatesVal =
|
|
|
|
CefX509CertificateCToCpp::Wrap(certificates[i]);
|
|
|
|
certificatesList.push_back(certificatesVal);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefRequestHandlerCppToC::Get(self)->OnSelectClientCertificate(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), isProxy ? true : false, CefString(host),
|
|
|
|
port, certificatesList,
|
2016-10-27 19:57:12 +02:00
|
|
|
CefSelectClientCertificateCallbackCToCpp::Wrap(callback));
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
request_handler_on_plugin_crashed(struct _cef_request_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
const cef_string_t* plugin_path) {
|
2013-04-04 19:50:35 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
2013-09-12 22:34:18 +02:00
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return;
|
|
|
|
// Verify param: plugin_path; type: string_byref_const
|
|
|
|
DCHECK(plugin_path);
|
|
|
|
if (!plugin_path)
|
|
|
|
return;
|
2013-04-04 19:50:35 +02:00
|
|
|
|
|
|
|
// Execute
|
2013-09-12 22:34:18 +02:00
|
|
|
CefRequestHandlerCppToC::Get(self)->OnPluginCrashed(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), CefString(plugin_path));
|
2013-09-12 22:34:18 +02:00
|
|
|
}
|
2013-04-04 19:50:35 +02:00
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
request_handler_on_render_view_ready(struct _cef_request_handler_t* self,
|
|
|
|
cef_browser_t* browser) {
|
2015-03-09 22:05:22 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRequestHandlerCppToC::Get(self)->OnRenderViewReady(
|
|
|
|
CefBrowserCToCpp::Wrap(browser));
|
|
|
|
}
|
|
|
|
|
2013-09-12 22:34:18 +02:00
|
|
|
void CEF_CALLBACK request_handler_on_render_process_terminated(
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_request_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
2014-01-06 20:59:48 +01:00
|
|
|
cef_termination_status_t status) {
|
2013-09-12 22:34:18 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRequestHandlerCppToC::Get(self)->OnRenderProcessTerminated(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), status);
|
2013-04-04 19:50:35 +02:00
|
|
|
}
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
} // namespace
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
CefRequestHandlerCppToC::CefRequestHandlerCppToC() {
|
|
|
|
GetStruct()->on_before_browse = request_handler_on_before_browse;
|
|
|
|
GetStruct()->on_open_urlfrom_tab = request_handler_on_open_urlfrom_tab;
|
|
|
|
GetStruct()->on_before_resource_load =
|
2012-04-03 03:34:16 +02:00
|
|
|
request_handler_on_before_resource_load;
|
2015-04-26 20:40:01 +02:00
|
|
|
GetStruct()->get_resource_handler = request_handler_get_resource_handler;
|
|
|
|
GetStruct()->on_resource_redirect = request_handler_on_resource_redirect;
|
|
|
|
GetStruct()->on_resource_response = request_handler_on_resource_response;
|
2015-12-05 03:58:56 +01:00
|
|
|
GetStruct()->get_resource_response_filter =
|
|
|
|
request_handler_get_resource_response_filter;
|
2015-12-04 19:59:14 +01:00
|
|
|
GetStruct()->on_resource_load_complete =
|
|
|
|
request_handler_on_resource_load_complete;
|
2015-04-26 20:40:01 +02:00
|
|
|
GetStruct()->get_auth_credentials = request_handler_get_auth_credentials;
|
|
|
|
GetStruct()->on_quota_request = request_handler_on_quota_request;
|
|
|
|
GetStruct()->on_protocol_execution = request_handler_on_protocol_execution;
|
|
|
|
GetStruct()->on_certificate_error = request_handler_on_certificate_error;
|
2016-10-27 19:57:12 +02:00
|
|
|
GetStruct()->on_select_client_certificate =
|
|
|
|
request_handler_on_select_client_certificate;
|
2015-04-26 20:40:01 +02:00
|
|
|
GetStruct()->on_plugin_crashed = request_handler_on_plugin_crashed;
|
|
|
|
GetStruct()->on_render_view_ready = request_handler_on_render_view_ready;
|
|
|
|
GetStruct()->on_render_process_terminated =
|
2013-09-12 22:34:18 +02:00
|
|
|
request_handler_on_render_process_terminated;
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefRefPtr<CefRequestHandler> CefCppToCRefCounted<
|
|
|
|
CefRequestHandlerCppToC,
|
|
|
|
CefRequestHandler,
|
|
|
|
cef_request_handler_t>::UnwrapDerived(CefWrapperType type,
|
|
|
|
cef_request_handler_t* s) {
|
2015-04-26 20:40:01 +02:00
|
|
|
NOTREACHED() << "Unexpected class type: " << type;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2016-09-01 13:24:30 +02:00
|
|
|
#if DCHECK_IS_ON()
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
base::AtomicRefCount CefCppToCRefCounted<CefRequestHandlerCppToC,
|
|
|
|
CefRequestHandler,
|
2017-07-27 01:19:27 +02:00
|
|
|
cef_request_handler_t>::DebugObjCt
|
|
|
|
ATOMIC_DECLARATION;
|
2012-04-03 03:34:16 +02:00
|
|
|
#endif
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefWrapperType CefCppToCRefCounted<CefRequestHandlerCppToC,
|
|
|
|
CefRequestHandler,
|
|
|
|
cef_request_handler_t>::kWrapperType =
|
2017-02-09 23:07:43 +01:00
|
|
|
WT_REQUEST_HANDLER;
|