2019-01-10 15:22:19 +01:00
|
|
|
// Copyright (c) 2019 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.
|
|
|
|
//
|
2019-05-24 22:23:43 +02:00
|
|
|
// $hash=3983c8f521d444195dc52b4605840b51289e77e0$
|
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/render_process_handler_ctocpp.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
#include "libcef_dll/cpptoc/browser_cpptoc.h"
|
2019-03-19 10:42:54 +01:00
|
|
|
#include "libcef_dll/cpptoc/dictionary_value_cpptoc.h"
|
2012-06-11 17:52:49 +02:00
|
|
|
#include "libcef_dll/cpptoc/domnode_cpptoc.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
#include "libcef_dll/cpptoc/frame_cpptoc.h"
|
2012-11-20 21:08:36 +01:00
|
|
|
#include "libcef_dll/cpptoc/list_value_cpptoc.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
#include "libcef_dll/cpptoc/process_message_cpptoc.h"
|
|
|
|
#include "libcef_dll/cpptoc/v8context_cpptoc.h"
|
2012-11-02 19:16:28 +01:00
|
|
|
#include "libcef_dll/cpptoc/v8exception_cpptoc.h"
|
|
|
|
#include "libcef_dll/cpptoc/v8stack_trace_cpptoc.h"
|
2013-09-13 01:36:54 +02:00
|
|
|
#include "libcef_dll/ctocpp/load_handler_ctocpp.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")
|
2012-11-20 21:08:36 +01:00
|
|
|
void CefRenderProcessHandlerCToCpp::OnRenderThreadCreated(
|
|
|
|
CefRefPtr<CefListValue> extra_info) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_render_process_handler_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_render_thread_created))
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2012-11-20 21:08:36 +01:00
|
|
|
// Verify param: extra_info; type: refptr_diff
|
|
|
|
DCHECK(extra_info.get());
|
|
|
|
if (!extra_info.get())
|
|
|
|
return;
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
_struct->on_render_thread_created(_struct,
|
2017-05-17 11:29:28 +02:00
|
|
|
CefListValueCppToC::Wrap(extra_info));
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2012-04-03 03:34:16 +02:00
|
|
|
void CefRenderProcessHandlerCToCpp::OnWebKitInitialized() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_render_process_handler_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_web_kit_initialized))
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
_struct->on_web_kit_initialized(_struct);
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2012-04-03 03:34:16 +02:00
|
|
|
void CefRenderProcessHandlerCToCpp::OnBrowserCreated(
|
2019-03-19 10:42:54 +01:00
|
|
|
CefRefPtr<CefBrowser> browser,
|
|
|
|
CefRefPtr<CefDictionaryValue> extra_info) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_render_process_handler_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_browser_created))
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
|
|
|
if (!browser.get())
|
|
|
|
return;
|
2019-03-19 10:42:54 +01:00
|
|
|
// Verify param: extra_info; type: refptr_diff
|
|
|
|
DCHECK(extra_info.get());
|
|
|
|
if (!extra_info.get())
|
|
|
|
return;
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Execute
|
2019-03-19 10:42:54 +01:00
|
|
|
_struct->on_browser_created(_struct, CefBrowserCppToC::Wrap(browser),
|
|
|
|
CefDictionaryValueCppToC::Wrap(extra_info));
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2012-04-03 03:34:16 +02:00
|
|
|
void CefRenderProcessHandlerCToCpp::OnBrowserDestroyed(
|
|
|
|
CefRefPtr<CefBrowser> browser) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_render_process_handler_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_browser_destroyed))
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
|
|
|
if (!browser.get())
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->on_browser_destroyed(_struct, CefBrowserCppToC::Wrap(browser));
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2013-09-13 01:36:54 +02:00
|
|
|
CefRefPtr<CefLoadHandler> CefRenderProcessHandlerCToCpp::GetLoadHandler() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_render_process_handler_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_load_handler))
|
2013-09-13 01:36:54 +02:00
|
|
|
return NULL;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_load_handler_t* _retval = _struct->get_load_handler(_struct);
|
2013-09-13 01:36:54 +02:00
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefLoadHandlerCToCpp::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2012-04-03 03:34:16 +02:00
|
|
|
void CefRenderProcessHandlerCToCpp::OnContextCreated(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRefPtr<CefBrowser> browser,
|
|
|
|
CefRefPtr<CefFrame> frame,
|
2012-04-03 03:34:16 +02:00
|
|
|
CefRefPtr<CefV8Context> context) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_render_process_handler_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_context_created))
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
|
|
|
if (!browser.get())
|
|
|
|
return;
|
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame.get());
|
|
|
|
if (!frame.get())
|
|
|
|
return;
|
|
|
|
// Verify param: context; type: refptr_diff
|
|
|
|
DCHECK(context.get());
|
|
|
|
if (!context.get())
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->on_context_created(_struct, CefBrowserCppToC::Wrap(browser),
|
|
|
|
CefFrameCppToC::Wrap(frame),
|
|
|
|
CefV8ContextCppToC::Wrap(context));
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2012-04-03 03:34:16 +02:00
|
|
|
void CefRenderProcessHandlerCToCpp::OnContextReleased(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRefPtr<CefBrowser> browser,
|
|
|
|
CefRefPtr<CefFrame> frame,
|
2012-04-03 03:34:16 +02:00
|
|
|
CefRefPtr<CefV8Context> context) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_render_process_handler_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_context_released))
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
|
|
|
if (!browser.get())
|
|
|
|
return;
|
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame.get());
|
|
|
|
if (!frame.get())
|
|
|
|
return;
|
|
|
|
// Verify param: context; type: refptr_diff
|
|
|
|
DCHECK(context.get());
|
|
|
|
if (!context.get())
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->on_context_released(_struct, CefBrowserCppToC::Wrap(browser),
|
|
|
|
CefFrameCppToC::Wrap(frame),
|
|
|
|
CefV8ContextCppToC::Wrap(context));
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2012-11-02 19:16:28 +01:00
|
|
|
void CefRenderProcessHandlerCToCpp::OnUncaughtException(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRefPtr<CefBrowser> browser,
|
|
|
|
CefRefPtr<CefFrame> frame,
|
|
|
|
CefRefPtr<CefV8Context> context,
|
|
|
|
CefRefPtr<CefV8Exception> exception,
|
2012-11-02 19:16:28 +01:00
|
|
|
CefRefPtr<CefV8StackTrace> stackTrace) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_render_process_handler_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_uncaught_exception))
|
2012-11-02 19:16:28 +01:00
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
|
|
|
if (!browser.get())
|
|
|
|
return;
|
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame.get());
|
|
|
|
if (!frame.get())
|
|
|
|
return;
|
|
|
|
// Verify param: context; type: refptr_diff
|
|
|
|
DCHECK(context.get());
|
|
|
|
if (!context.get())
|
|
|
|
return;
|
|
|
|
// Verify param: exception; type: refptr_diff
|
|
|
|
DCHECK(exception.get());
|
|
|
|
if (!exception.get())
|
|
|
|
return;
|
|
|
|
// Verify param: stackTrace; type: refptr_diff
|
|
|
|
DCHECK(stackTrace.get());
|
|
|
|
if (!stackTrace.get())
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->on_uncaught_exception(
|
|
|
|
_struct, CefBrowserCppToC::Wrap(browser), CefFrameCppToC::Wrap(frame),
|
|
|
|
CefV8ContextCppToC::Wrap(context), CefV8ExceptionCppToC::Wrap(exception),
|
2012-11-02 19:16:28 +01:00
|
|
|
CefV8StackTraceCppToC::Wrap(stackTrace));
|
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2012-06-11 17:52:49 +02:00
|
|
|
void CefRenderProcessHandlerCToCpp::OnFocusedNodeChanged(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRefPtr<CefBrowser> browser,
|
|
|
|
CefRefPtr<CefFrame> frame,
|
2012-06-11 17:52:49 +02:00
|
|
|
CefRefPtr<CefDOMNode> node) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_render_process_handler_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_focused_node_changed))
|
2012-06-11 17:52:49 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
|
|
|
if (!browser.get())
|
|
|
|
return;
|
|
|
|
// Unverified params: frame, node
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->on_focused_node_changed(_struct, CefBrowserCppToC::Wrap(browser),
|
|
|
|
CefFrameCppToC::Wrap(frame),
|
|
|
|
CefDOMNodeCppToC::Wrap(node));
|
2012-06-11 17:52:49 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2012-06-11 22:03:49 +02:00
|
|
|
bool CefRenderProcessHandlerCToCpp::OnProcessMessageReceived(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRefPtr<CefBrowser> browser,
|
2019-05-24 22:23:43 +02:00
|
|
|
CefRefPtr<CefFrame> frame,
|
2017-05-17 11:29:28 +02:00
|
|
|
CefProcessId source_process,
|
2012-04-03 03:34:16 +02:00
|
|
|
CefRefPtr<CefProcessMessage> message) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_render_process_handler_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_process_message_received))
|
2012-04-03 03:34:16 +02:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
|
|
|
if (!browser.get())
|
|
|
|
return false;
|
2019-05-24 22:23:43 +02:00
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame.get());
|
|
|
|
if (!frame.get())
|
|
|
|
return false;
|
2012-04-03 03:34:16 +02:00
|
|
|
// Verify param: message; type: refptr_diff
|
|
|
|
DCHECK(message.get());
|
|
|
|
if (!message.get())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
int _retval = _struct->on_process_message_received(
|
2019-05-24 22:23:43 +02:00
|
|
|
_struct, CefBrowserCppToC::Wrap(browser), CefFrameCppToC::Wrap(frame),
|
|
|
|
source_process, CefProcessMessageCppToC::Wrap(message));
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
2017-05-17 11:29:28 +02:00
|
|
|
return _retval ? true : false;
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRenderProcessHandlerCToCpp::CefRenderProcessHandlerCToCpp() {}
|
2015-04-26 20:40:01 +02:00
|
|
|
|
2019-01-23 16:42:12 +01:00
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefRenderProcessHandlerCToCpp::~CefRenderProcessHandlerCToCpp() {}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
cef_render_process_handler_t* CefCToCppRefCounted<
|
|
|
|
CefRenderProcessHandlerCToCpp,
|
|
|
|
CefRenderProcessHandler,
|
|
|
|
cef_render_process_handler_t>::UnwrapDerived(CefWrapperType type,
|
|
|
|
CefRenderProcessHandler* c) {
|
2015-04-26 20:40:01 +02:00
|
|
|
NOTREACHED() << "Unexpected class type: " << type;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefWrapperType CefCToCppRefCounted<CefRenderProcessHandlerCToCpp,
|
|
|
|
CefRenderProcessHandler,
|
|
|
|
cef_render_process_handler_t>::kWrapperType =
|
2015-04-26 20:40:01 +02:00
|
|
|
WT_RENDER_PROCESS_HANDLER;
|