2023-01-02 23:47:15 +01:00
|
|
|
// Copyright (c) 2023 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.
|
|
|
|
//
|
2023-05-08 17:15:02 +02:00
|
|
|
// $hash=19152f67304ceaf2d54f0b8133f317974145d40e$
|
2017-05-17 11:29:28 +02:00
|
|
|
//
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2017-05-19 11:06:00 +02:00
|
|
|
#include "libcef_dll/ctocpp/request_handler_ctocpp.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
#include "libcef_dll/cpptoc/auth_callback_cpptoc.h"
|
|
|
|
#include "libcef_dll/cpptoc/browser_cpptoc.h"
|
2021-09-27 11:09:45 +02:00
|
|
|
#include "libcef_dll/cpptoc/callback_cpptoc.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
#include "libcef_dll/cpptoc/frame_cpptoc.h"
|
2017-05-17 11:29:28 +02:00
|
|
|
#include "libcef_dll/cpptoc/request_cpptoc.h"
|
2016-10-27 19:57:12 +02:00
|
|
|
#include "libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.h"
|
2017-05-17 11:29:28 +02:00
|
|
|
#include "libcef_dll/cpptoc/sslinfo_cpptoc.h"
|
2016-10-27 19:57:12 +02:00
|
|
|
#include "libcef_dll/cpptoc/x509certificate_cpptoc.h"
|
2019-04-24 04:50:25 +02:00
|
|
|
#include "libcef_dll/ctocpp/resource_request_handler_ctocpp.h"
|
2019-01-23 16:42:12 +01:00
|
|
|
#include "libcef_dll/shutdown_checker.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// VIRTUAL METHODS - Body may be edited by hand.
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2013-09-12 19:44:54 +02:00
|
|
|
bool CefRequestHandlerCToCpp::OnBeforeBrowse(CefRefPtr<CefBrowser> browser,
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRefPtr<CefFrame> frame,
|
|
|
|
CefRefPtr<CefRequest> request,
|
2018-04-27 17:11:53 +02:00
|
|
|
bool user_gesture,
|
2017-05-17 11:29:28 +02:00
|
|
|
bool is_redirect) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_request_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_before_browse)) {
|
2013-09-12 19:44:54 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2013-09-12 19:44:54 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2013-09-12 19:44:54 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2013-09-12 19:44:54 +02:00
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!frame.get()) {
|
2013-09-12 19:44:54 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2013-09-12 19:44:54 +02:00
|
|
|
// Verify param: request; type: refptr_diff
|
|
|
|
DCHECK(request.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!request.get()) {
|
2013-09-12 19:44:54 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2013-09-12 19:44:54 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
int _retval = _struct->on_before_browse(
|
|
|
|
_struct, CefBrowserCppToC::Wrap(browser), CefFrameCppToC::Wrap(frame),
|
2018-04-27 17:11:53 +02:00
|
|
|
CefRequestCppToC::Wrap(request), user_gesture, is_redirect);
|
2013-09-12 19:44:54 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
2017-05-17 11:29:28 +02:00
|
|
|
return _retval ? true : false;
|
2013-09-12 19:44:54 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2017-05-17 11:29:28 +02:00
|
|
|
bool CefRequestHandlerCToCpp::OnOpenURLFromTab(
|
|
|
|
CefRefPtr<CefBrowser> browser,
|
|
|
|
CefRefPtr<CefFrame> frame,
|
|
|
|
const CefString& target_url,
|
|
|
|
WindowOpenDisposition target_disposition,
|
|
|
|
bool user_gesture) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_request_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_open_urlfrom_tab)) {
|
2015-03-09 21:22:31 +01:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2015-03-09 21:22:31 +01:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2015-03-09 21:22:31 +01:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2015-03-09 21:22:31 +01:00
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!frame.get()) {
|
2015-03-09 21:22:31 +01:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2015-03-09 21:22:31 +01:00
|
|
|
// Verify param: target_url; type: string_byref_const
|
|
|
|
DCHECK(!target_url.empty());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (target_url.empty()) {
|
2015-03-09 21:22:31 +01:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2015-03-09 21:22:31 +01:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
int _retval = _struct->on_open_urlfrom_tab(
|
|
|
|
_struct, CefBrowserCppToC::Wrap(browser), CefFrameCppToC::Wrap(frame),
|
|
|
|
target_url.GetStruct(), target_disposition, user_gesture);
|
2015-03-09 21:22:31 +01:00
|
|
|
|
|
|
|
// Return type: bool
|
2017-05-17 11:29:28 +02:00
|
|
|
return _retval ? true : false;
|
2015-03-09 21:22:31 +01:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2021-09-27 11:09:45 +02:00
|
|
|
CefRefPtr<CefResourceRequestHandler>
|
|
|
|
CefRequestHandlerCToCpp::GetResourceRequestHandler(
|
|
|
|
CefRefPtr<CefBrowser> browser,
|
|
|
|
CefRefPtr<CefFrame> frame,
|
|
|
|
CefRefPtr<CefRequest> request,
|
|
|
|
bool is_navigation,
|
|
|
|
bool is_download,
|
|
|
|
const CefString& request_initiator,
|
|
|
|
bool& disable_default_handling) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_request_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_resource_request_handler)) {
|
2020-01-15 14:53:19 +01:00
|
|
|
return nullptr;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2020-01-15 14:53:19 +01:00
|
|
|
return nullptr;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!frame.get()) {
|
2020-01-15 14:53:19 +01:00
|
|
|
return nullptr;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
// Verify param: request; type: refptr_diff
|
|
|
|
DCHECK(request.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!request.get()) {
|
2020-01-15 14:53:19 +01:00
|
|
|
return nullptr;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2019-04-24 04:50:25 +02:00
|
|
|
// Unverified params: request_initiator
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2019-04-24 04:50:25 +02:00
|
|
|
// Translate param: disable_default_handling; type: bool_byref
|
|
|
|
int disable_default_handlingInt = disable_default_handling;
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Execute
|
2019-04-24 04:50:25 +02:00
|
|
|
cef_resource_request_handler_t* _retval =
|
|
|
|
_struct->get_resource_request_handler(
|
|
|
|
_struct, CefBrowserCppToC::Wrap(browser), CefFrameCppToC::Wrap(frame),
|
|
|
|
CefRequestCppToC::Wrap(request), is_navigation, is_download,
|
|
|
|
request_initiator.GetStruct(), &disable_default_handlingInt);
|
2015-12-05 03:58:56 +01:00
|
|
|
|
2019-04-24 04:50:25 +02:00
|
|
|
// Restore param:disable_default_handling; type: bool_byref
|
|
|
|
disable_default_handling = disable_default_handlingInt ? true : false;
|
2015-12-05 03:58:56 +01:00
|
|
|
|
|
|
|
// Return type: refptr_same
|
2019-04-24 04:50:25 +02:00
|
|
|
return CefResourceRequestHandlerCToCpp::Wrap(_retval);
|
2015-12-04 19:59:14 +01:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2017-05-17 11:29:28 +02:00
|
|
|
bool CefRequestHandlerCToCpp::GetAuthCredentials(
|
|
|
|
CefRefPtr<CefBrowser> browser,
|
2019-07-12 22:44:43 +02:00
|
|
|
const CefString& origin_url,
|
2017-05-17 11:29:28 +02:00
|
|
|
bool isProxy,
|
|
|
|
const CefString& host,
|
|
|
|
int port,
|
|
|
|
const CefString& realm,
|
|
|
|
const CefString& scheme,
|
2012-04-03 03:34:16 +02:00
|
|
|
CefRefPtr<CefAuthCallback> callback) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_request_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_auth_credentials)) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2019-07-12 22:44:43 +02:00
|
|
|
// Verify param: origin_url; type: string_byref_const
|
|
|
|
DCHECK(!origin_url.empty());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (origin_url.empty()) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
// Verify param: host; type: string_byref_const
|
|
|
|
DCHECK(!host.empty());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (host.empty()) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
// Verify param: callback; type: refptr_diff
|
|
|
|
DCHECK(callback.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!callback.get()) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2015-12-17 19:24:14 +01:00
|
|
|
// Unverified params: realm, scheme
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
int _retval = _struct->get_auth_credentials(
|
2019-07-12 22:44:43 +02:00
|
|
|
_struct, CefBrowserCppToC::Wrap(browser), origin_url.GetStruct(), isProxy,
|
|
|
|
host.GetStruct(), port, realm.GetStruct(), scheme.GetStruct(),
|
2012-04-03 03:34:16 +02:00
|
|
|
CefAuthCallbackCppToC::Wrap(callback));
|
|
|
|
|
|
|
|
// Return type: bool
|
2017-05-17 11:29:28 +02:00
|
|
|
return _retval ? true : false;
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2017-05-17 11:29:28 +02:00
|
|
|
bool CefRequestHandlerCToCpp::OnCertificateError(
|
|
|
|
CefRefPtr<CefBrowser> browser,
|
|
|
|
cef_errorcode_t cert_error,
|
|
|
|
const CefString& request_url,
|
|
|
|
CefRefPtr<CefSSLInfo> ssl_info,
|
2021-09-27 11:09:45 +02:00
|
|
|
CefRefPtr<CefCallback> callback) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_request_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_certificate_error)) {
|
2013-09-12 22:34:18 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2013-09-12 22:34:18 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2015-02-11 19:15:04 +01:00
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2015-02-11 19:15:04 +01:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2013-09-12 22:34:18 +02:00
|
|
|
// Verify param: request_url; type: string_byref_const
|
|
|
|
DCHECK(!request_url.empty());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (request_url.empty()) {
|
2013-09-12 22:34:18 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2015-02-11 19:15:04 +01:00
|
|
|
// Verify param: ssl_info; type: refptr_diff
|
|
|
|
DCHECK(ssl_info.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!ssl_info.get()) {
|
2015-02-11 19:15:04 +01:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2013-09-12 22:34:18 +02:00
|
|
|
// Verify param: callback; type: refptr_diff
|
|
|
|
DCHECK(callback.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!callback.get()) {
|
2013-09-12 22:34:18 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2013-09-12 22:34:18 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
int _retval = _struct->on_certificate_error(
|
|
|
|
_struct, CefBrowserCppToC::Wrap(browser), cert_error,
|
|
|
|
request_url.GetStruct(), CefSSLInfoCppToC::Wrap(ssl_info),
|
2021-09-27 11:09:45 +02:00
|
|
|
CefCallbackCppToC::Wrap(callback));
|
2013-09-12 22:34:18 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
2017-05-17 11:29:28 +02:00
|
|
|
return _retval ? true : false;
|
2013-09-12 22:34:18 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2016-10-27 19:57:12 +02:00
|
|
|
bool CefRequestHandlerCToCpp::OnSelectClientCertificate(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRefPtr<CefBrowser> browser,
|
|
|
|
bool isProxy,
|
|
|
|
const CefString& host,
|
|
|
|
int port,
|
|
|
|
const X509CertificateList& certificates,
|
2016-10-27 19:57:12 +02:00
|
|
|
CefRefPtr<CefSelectClientCertificateCallback> callback) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2016-10-27 19:57:12 +02:00
|
|
|
cef_request_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_select_client_certificate)) {
|
2016-10-27 19:57:12 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-10-27 19:57:12 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2016-10-27 19:57:12 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-10-27 19:57:12 +02:00
|
|
|
// Verify param: host; type: string_byref_const
|
|
|
|
DCHECK(!host.empty());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (host.empty()) {
|
2016-10-27 19:57:12 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-10-27 19:57:12 +02:00
|
|
|
// Verify param: callback; type: refptr_diff
|
|
|
|
DCHECK(callback.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!callback.get()) {
|
2016-10-27 19:57:12 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-10-27 19:57:12 +02:00
|
|
|
|
|
|
|
// Translate param: certificates; type: refptr_vec_diff_byref_const
|
|
|
|
const size_t certificatesCount = certificates.size();
|
|
|
|
cef_x509certificate_t** certificatesList = NULL;
|
|
|
|
if (certificatesCount > 0) {
|
|
|
|
certificatesList = new cef_x509certificate_t*[certificatesCount];
|
|
|
|
DCHECK(certificatesList);
|
|
|
|
if (certificatesList) {
|
|
|
|
for (size_t i = 0; i < certificatesCount; ++i) {
|
|
|
|
certificatesList[i] = CefX509CertificateCppToC::Wrap(certificates[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
int _retval = _struct->on_select_client_certificate(
|
|
|
|
_struct, CefBrowserCppToC::Wrap(browser), isProxy, host.GetStruct(), port,
|
|
|
|
certificatesCount, certificatesList,
|
2016-10-27 19:57:12 +02:00
|
|
|
CefSelectClientCertificateCallbackCppToC::Wrap(callback));
|
|
|
|
|
|
|
|
// Restore param:certificates; type: refptr_vec_diff_byref_const
|
2023-01-02 23:47:15 +01:00
|
|
|
if (certificatesList) {
|
2017-05-17 11:29:28 +02:00
|
|
|
delete[] certificatesList;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-10-27 19:57:12 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
2017-05-17 11:29:28 +02:00
|
|
|
return _retval ? true : false;
|
2016-10-27 19:57:12 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2015-03-09 22:05:22 +01:00
|
|
|
void CefRequestHandlerCToCpp::OnRenderViewReady(CefRefPtr<CefBrowser> browser) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_request_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_render_view_ready)) {
|
2015-03-09 22:05:22 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2015-03-09 22:05:22 +01:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2015-03-09 22:05:22 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2015-03-09 22:05:22 +01:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->on_render_view_ready(_struct, CefBrowserCppToC::Wrap(browser));
|
2015-03-09 22:05:22 +01:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2013-09-12 22:34:18 +02:00
|
|
|
void CefRequestHandlerCToCpp::OnRenderProcessTerminated(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRefPtr<CefBrowser> browser,
|
|
|
|
TerminationStatus status) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_request_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_render_process_terminated)) {
|
2013-09-12 22:34:18 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2013-09-12 22:34:18 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2013-09-12 22:34:18 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2013-09-12 22:34:18 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->on_render_process_terminated(
|
|
|
|
_struct, CefBrowserCppToC::Wrap(browser), status);
|
2013-04-04 19:50:35 +02:00
|
|
|
}
|
|
|
|
|
2020-06-13 02:54:08 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
|
|
|
void CefRequestHandlerCToCpp::OnDocumentAvailableInMainFrame(
|
|
|
|
CefRefPtr<CefBrowser> browser) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
cef_request_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_document_available_in_main_frame)) {
|
2020-06-13 02:54:08 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-06-13 02:54:08 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2020-06-13 02:54:08 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-06-13 02:54:08 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
_struct->on_document_available_in_main_frame(_struct,
|
|
|
|
CefBrowserCppToC::Wrap(browser));
|
|
|
|
}
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRequestHandlerCToCpp::CefRequestHandlerCToCpp() {}
|
2015-04-26 20:40:01 +02:00
|
|
|
|
2019-01-23 16:42:12 +01:00
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefRequestHandlerCToCpp::~CefRequestHandlerCToCpp() {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
cef_request_handler_t* CefCToCppRefCounted<
|
|
|
|
CefRequestHandlerCToCpp,
|
|
|
|
CefRequestHandler,
|
|
|
|
cef_request_handler_t>::UnwrapDerived(CefWrapperType type,
|
|
|
|
CefRequestHandler* c) {
|
2023-05-08 17:15:02 +02:00
|
|
|
DCHECK(false) << "Unexpected class type: " << type;
|
2020-01-15 14:53:19 +01:00
|
|
|
return nullptr;
|
2015-04-26 20:40:01 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefWrapperType CefCToCppRefCounted<CefRequestHandlerCToCpp,
|
|
|
|
CefRequestHandler,
|
|
|
|
cef_request_handler_t>::kWrapperType =
|
2017-02-09 23:07:43 +01:00
|
|
|
WT_REQUEST_HANDLER;
|