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=41a3981a7d293d6a13bba9961192d4fc7f0a49f1$
|
2017-05-17 11:29:28 +02:00
|
|
|
//
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
#include "libcef_dll/cpptoc/render_process_handler_cpptoc.h"
|
2017-05-19 11:06:00 +02:00
|
|
|
#include "libcef_dll/cpptoc/load_handler_cpptoc.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
2019-03-19 10:42:54 +01:00
|
|
|
#include "libcef_dll/ctocpp/dictionary_value_ctocpp.h"
|
2012-06-11 17:52:49 +02:00
|
|
|
#include "libcef_dll/ctocpp/domnode_ctocpp.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
#include "libcef_dll/ctocpp/frame_ctocpp.h"
|
|
|
|
#include "libcef_dll/ctocpp/process_message_ctocpp.h"
|
|
|
|
#include "libcef_dll/ctocpp/v8context_ctocpp.h"
|
2012-11-02 19:16:28 +01:00
|
|
|
#include "libcef_dll/ctocpp/v8exception_ctocpp.h"
|
|
|
|
#include "libcef_dll/ctocpp/v8stack_trace_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.
|
|
|
|
|
|
|
|
void CEF_CALLBACK render_process_handler_on_web_kit_initialized(
|
|
|
|
struct _cef_render_process_handler_t* self) {
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRenderProcessHandlerCppToC::Get(self)->OnWebKitInitialized();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK render_process_handler_on_browser_created(
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_render_process_handler_t* self,
|
2019-03-19 10:42:54 +01:00
|
|
|
cef_browser_t* browser,
|
|
|
|
struct _cef_dictionary_value_t* extra_info) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2021-05-14 18:58:55 +02:00
|
|
|
// Unverified params: extra_info
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRenderProcessHandlerCppToC::Get(self)->OnBrowserCreated(
|
2019-03-19 10:42:54 +01:00
|
|
|
CefBrowserCToCpp::Wrap(browser),
|
|
|
|
CefDictionaryValueCToCpp::Wrap(extra_info));
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK render_process_handler_on_browser_destroyed(
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_render_process_handler_t* self,
|
|
|
|
cef_browser_t* browser) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRenderProcessHandlerCppToC::Get(self)->OnBrowserDestroyed(
|
|
|
|
CefBrowserCToCpp::Wrap(browser));
|
|
|
|
}
|
|
|
|
|
2013-09-13 01:36:54 +02:00
|
|
|
cef_load_handler_t* CEF_CALLBACK render_process_handler_get_load_handler(
|
|
|
|
struct _cef_render_process_handler_t* self) {
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2013-09-13 01:36:54 +02:00
|
|
|
return NULL;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2013-09-13 01:36:54 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRefPtr<CefLoadHandler> _retval =
|
|
|
|
CefRenderProcessHandlerCppToC::Get(self)->GetLoadHandler();
|
2013-09-13 01:36:54 +02:00
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefLoadHandlerCppToC::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
void CEF_CALLBACK render_process_handler_on_context_created(
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_render_process_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame,
|
|
|
|
struct _cef_v8context_t* context) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!frame) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
// Verify param: context; type: refptr_diff
|
|
|
|
DCHECK(context);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!context) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRenderProcessHandlerCppToC::Get(self)->OnContextCreated(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame),
|
2012-04-03 03:34:16 +02:00
|
|
|
CefV8ContextCToCpp::Wrap(context));
|
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK render_process_handler_on_context_released(
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_render_process_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame,
|
|
|
|
struct _cef_v8context_t* context) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!frame) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
// Verify param: context; type: refptr_diff
|
|
|
|
DCHECK(context);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!context) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRenderProcessHandlerCppToC::Get(self)->OnContextReleased(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame),
|
2012-04-03 03:34:16 +02:00
|
|
|
CefV8ContextCToCpp::Wrap(context));
|
|
|
|
}
|
|
|
|
|
2012-11-02 19:16:28 +01:00
|
|
|
void CEF_CALLBACK render_process_handler_on_uncaught_exception(
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_render_process_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame,
|
|
|
|
struct _cef_v8context_t* context,
|
2012-11-02 19:16:28 +01:00
|
|
|
struct _cef_v8exception_t* exception,
|
|
|
|
struct _cef_v8stack_trace_t* stackTrace) {
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2012-11-02 19:16:28 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-11-02 19:16:28 +01:00
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser) {
|
2012-11-02 19:16:28 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-11-02 19:16:28 +01:00
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!frame) {
|
2012-11-02 19:16:28 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-11-02 19:16:28 +01:00
|
|
|
// Verify param: context; type: refptr_diff
|
|
|
|
DCHECK(context);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!context) {
|
2012-11-02 19:16:28 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-11-02 19:16:28 +01:00
|
|
|
// Verify param: exception; type: refptr_diff
|
|
|
|
DCHECK(exception);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!exception) {
|
2012-11-02 19:16:28 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-11-02 19:16:28 +01:00
|
|
|
// Verify param: stackTrace; type: refptr_diff
|
|
|
|
DCHECK(stackTrace);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!stackTrace) {
|
2012-11-02 19:16:28 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-11-02 19:16:28 +01:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRenderProcessHandlerCppToC::Get(self)->OnUncaughtException(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame),
|
|
|
|
CefV8ContextCToCpp::Wrap(context), CefV8ExceptionCToCpp::Wrap(exception),
|
2012-11-02 19:16:28 +01:00
|
|
|
CefV8StackTraceCToCpp::Wrap(stackTrace));
|
|
|
|
}
|
|
|
|
|
2012-06-11 17:52:49 +02:00
|
|
|
void CEF_CALLBACK render_process_handler_on_focused_node_changed(
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_render_process_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame,
|
|
|
|
cef_domnode_t* node) {
|
2012-06-11 17:52:49 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2012-06-11 17:52:49 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-06-11 17:52:49 +02:00
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser) {
|
2012-06-11 17:52:49 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-06-11 17:52:49 +02:00
|
|
|
// Unverified params: frame, node
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRenderProcessHandlerCppToC::Get(self)->OnFocusedNodeChanged(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame),
|
2012-06-11 17:52:49 +02:00
|
|
|
CefDOMNodeCToCpp::Wrap(node));
|
|
|
|
}
|
|
|
|
|
2012-06-11 22:03:49 +02:00
|
|
|
int CEF_CALLBACK render_process_handler_on_process_message_received(
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_render_process_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
2019-05-24 22:23:43 +02:00
|
|
|
cef_frame_t* frame,
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_process_id_t source_process,
|
|
|
|
cef_process_message_t* message) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2019-05-24 22:23:43 +02:00
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!frame) {
|
2019-05-24 22:23:43 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
// Verify param: message; type: refptr_diff
|
|
|
|
DCHECK(message);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!message) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
bool _retval =
|
|
|
|
CefRenderProcessHandlerCppToC::Get(self)->OnProcessMessageReceived(
|
2019-05-24 22:23:43 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame),
|
|
|
|
source_process, CefProcessMessageCToCpp::Wrap(message));
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
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
|
|
|
CefRenderProcessHandlerCppToC::CefRenderProcessHandlerCppToC() {
|
|
|
|
GetStruct()->on_web_kit_initialized =
|
2012-04-03 03:34:16 +02:00
|
|
|
render_process_handler_on_web_kit_initialized;
|
2015-04-26 20:40:01 +02:00
|
|
|
GetStruct()->on_browser_created = render_process_handler_on_browser_created;
|
|
|
|
GetStruct()->on_browser_destroyed =
|
2012-04-03 03:34:16 +02:00
|
|
|
render_process_handler_on_browser_destroyed;
|
2015-04-26 20:40:01 +02:00
|
|
|
GetStruct()->get_load_handler = render_process_handler_get_load_handler;
|
|
|
|
GetStruct()->on_context_created = render_process_handler_on_context_created;
|
|
|
|
GetStruct()->on_context_released = render_process_handler_on_context_released;
|
|
|
|
GetStruct()->on_uncaught_exception =
|
2012-11-02 19:16:28 +01:00
|
|
|
render_process_handler_on_uncaught_exception;
|
2015-04-26 20:40:01 +02:00
|
|
|
GetStruct()->on_focused_node_changed =
|
2012-06-11 17:52:49 +02:00
|
|
|
render_process_handler_on_focused_node_changed;
|
2015-04-26 20:40:01 +02:00
|
|
|
GetStruct()->on_process_message_received =
|
2012-06-11 22:03:49 +02:00
|
|
|
render_process_handler_on_process_message_received;
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
2019-01-23 16:42:12 +01:00
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefRenderProcessHandlerCppToC::~CefRenderProcessHandlerCppToC() {}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefRefPtr<CefRenderProcessHandler> CefCppToCRefCounted<
|
|
|
|
CefRenderProcessHandlerCppToC,
|
|
|
|
CefRenderProcessHandler,
|
|
|
|
cef_render_process_handler_t>::UnwrapDerived(CefWrapperType type,
|
|
|
|
cef_render_process_handler_t*
|
|
|
|
s) {
|
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 CefCppToCRefCounted<CefRenderProcessHandlerCppToC,
|
|
|
|
CefRenderProcessHandler,
|
|
|
|
cef_render_process_handler_t>::kWrapperType =
|
2015-04-26 20:40:01 +02:00
|
|
|
WT_RENDER_PROCESS_HANDLER;
|