2014-01-06 20:48:18 +01:00
|
|
|
// Copyright (c) 2014 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.
|
|
|
|
//
|
|
|
|
|
2013-09-13 01:36:54 +02:00
|
|
|
#include "libcef_dll/cpptoc/load_handler_cpptoc.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
#include "libcef_dll/cpptoc/render_process_handler_cpptoc.h"
|
|
|
|
#include "libcef_dll/ctocpp/browser_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"
|
2012-11-20 21:08:36 +01:00
|
|
|
#include "libcef_dll/ctocpp/list_value_ctocpp.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
#include "libcef_dll/ctocpp/process_message_ctocpp.h"
|
2013-11-21 21:59:28 +01:00
|
|
|
#include "libcef_dll/ctocpp/request_ctocpp.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
#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
|
|
|
|
|
|
|
|
|
|
|
// MEMBER FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
|
|
|
void CEF_CALLBACK render_process_handler_on_render_thread_created(
|
2012-11-20 21:08:36 +01:00
|
|
|
struct _cef_render_process_handler_t* self,
|
|
|
|
struct _cef_list_value_t* extra_info) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
2012-11-20 21:08:36 +01:00
|
|
|
// Verify param: extra_info; type: refptr_diff
|
|
|
|
DCHECK(extra_info);
|
|
|
|
if (!extra_info)
|
|
|
|
return;
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Execute
|
2012-11-20 21:08:36 +01:00
|
|
|
CefRenderProcessHandlerCppToC::Get(self)->OnRenderThreadCreated(
|
|
|
|
CefListValueCToCpp::Wrap(extra_info));
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRenderProcessHandlerCppToC::Get(self)->OnWebKitInitialized();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK render_process_handler_on_browser_created(
|
|
|
|
struct _cef_render_process_handler_t* self, cef_browser_t* browser) {
|
|
|
|
// 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
|
|
|
|
CefRenderProcessHandlerCppToC::Get(self)->OnBrowserCreated(
|
|
|
|
CefBrowserCToCpp::Wrap(browser));
|
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK render_process_handler_on_browser_destroyed(
|
|
|
|
struct _cef_render_process_handler_t* self, cef_browser_t* browser) {
|
|
|
|
// 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
|
|
|
|
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);
|
|
|
|
if (!self)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRefPtr<CefLoadHandler> _retval = CefRenderProcessHandlerCppToC::Get(
|
|
|
|
self)->GetLoadHandler();
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefLoadHandlerCppToC::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
2013-11-21 21:59:28 +01:00
|
|
|
int CEF_CALLBACK render_process_handler_on_before_navigation(
|
|
|
|
struct _cef_render_process_handler_t* self, cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame, struct _cef_request_t* request,
|
2014-01-06 20:59:48 +01:00
|
|
|
cef_navigation_type_t navigation_type, int is_redirect) {
|
2013-11-21 21:59:28 +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;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefRenderProcessHandlerCppToC::Get(self)->OnBeforeNavigation(
|
|
|
|
CefBrowserCToCpp::Wrap(browser),
|
|
|
|
CefFrameCToCpp::Wrap(frame),
|
|
|
|
CefRequestCToCpp::Wrap(request),
|
|
|
|
navigation_type,
|
|
|
|
is_redirect?true:false);
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
void CEF_CALLBACK render_process_handler_on_context_created(
|
|
|
|
struct _cef_render_process_handler_t* self, cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame, struct _cef_v8context_t* context) {
|
|
|
|
// 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: context; type: refptr_diff
|
|
|
|
DCHECK(context);
|
|
|
|
if (!context)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRenderProcessHandlerCppToC::Get(self)->OnContextCreated(
|
|
|
|
CefBrowserCToCpp::Wrap(browser),
|
|
|
|
CefFrameCToCpp::Wrap(frame),
|
|
|
|
CefV8ContextCToCpp::Wrap(context));
|
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK render_process_handler_on_context_released(
|
|
|
|
struct _cef_render_process_handler_t* self, cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame, struct _cef_v8context_t* context) {
|
|
|
|
// 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: context; type: refptr_diff
|
|
|
|
DCHECK(context);
|
|
|
|
if (!context)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRenderProcessHandlerCppToC::Get(self)->OnContextReleased(
|
|
|
|
CefBrowserCToCpp::Wrap(browser),
|
|
|
|
CefFrameCToCpp::Wrap(frame),
|
|
|
|
CefV8ContextCToCpp::Wrap(context));
|
|
|
|
}
|
|
|
|
|
2012-11-02 19:16:28 +01:00
|
|
|
void CEF_CALLBACK render_process_handler_on_uncaught_exception(
|
|
|
|
struct _cef_render_process_handler_t* self, cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame, struct _cef_v8context_t* context,
|
|
|
|
struct _cef_v8exception_t* exception,
|
|
|
|
struct _cef_v8stack_trace_t* stackTrace) {
|
|
|
|
// 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: context; type: refptr_diff
|
|
|
|
DCHECK(context);
|
|
|
|
if (!context)
|
|
|
|
return;
|
|
|
|
// Verify param: exception; type: refptr_diff
|
|
|
|
DCHECK(exception);
|
|
|
|
if (!exception)
|
|
|
|
return;
|
|
|
|
// Verify param: stackTrace; type: refptr_diff
|
|
|
|
DCHECK(stackTrace);
|
|
|
|
if (!stackTrace)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRenderProcessHandlerCppToC::Get(self)->OnUncaughtException(
|
|
|
|
CefBrowserCToCpp::Wrap(browser),
|
|
|
|
CefFrameCToCpp::Wrap(frame),
|
|
|
|
CefV8ContextCToCpp::Wrap(context),
|
|
|
|
CefV8ExceptionCToCpp::Wrap(exception),
|
|
|
|
CefV8StackTraceCToCpp::Wrap(stackTrace));
|
|
|
|
}
|
|
|
|
|
2012-06-11 17:52:49 +02:00
|
|
|
void CEF_CALLBACK render_process_handler_on_focused_node_changed(
|
|
|
|
struct _cef_render_process_handler_t* self, cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame, cef_domnode_t* node) {
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return;
|
|
|
|
// Unverified params: frame, node
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRenderProcessHandlerCppToC::Get(self)->OnFocusedNodeChanged(
|
|
|
|
CefBrowserCToCpp::Wrap(browser),
|
|
|
|
CefFrameCToCpp::Wrap(frame),
|
|
|
|
CefDOMNodeCToCpp::Wrap(node));
|
|
|
|
}
|
|
|
|
|
2012-06-11 22:03:49 +02:00
|
|
|
int CEF_CALLBACK render_process_handler_on_process_message_received(
|
2012-04-03 03:34:16 +02:00
|
|
|
struct _cef_render_process_handler_t* self, cef_browser_t* browser,
|
2014-01-06 20:59:48 +01: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);
|
|
|
|
if (!self)
|
|
|
|
return 0;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return 0;
|
|
|
|
// Verify param: message; type: refptr_diff
|
|
|
|
DCHECK(message);
|
|
|
|
if (!message)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefRenderProcessHandlerCppToC::Get(
|
2012-06-11 22:03:49 +02:00
|
|
|
self)->OnProcessMessageReceived(
|
2012-04-03 03:34:16 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser),
|
|
|
|
source_process,
|
|
|
|
CefProcessMessageCToCpp::Wrap(message));
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefRenderProcessHandlerCppToC::CefRenderProcessHandlerCppToC(
|
|
|
|
CefRenderProcessHandler* cls)
|
|
|
|
: CefCppToC<CefRenderProcessHandlerCppToC, CefRenderProcessHandler,
|
|
|
|
cef_render_process_handler_t>(cls) {
|
|
|
|
struct_.struct_.on_render_thread_created =
|
|
|
|
render_process_handler_on_render_thread_created;
|
|
|
|
struct_.struct_.on_web_kit_initialized =
|
|
|
|
render_process_handler_on_web_kit_initialized;
|
|
|
|
struct_.struct_.on_browser_created =
|
|
|
|
render_process_handler_on_browser_created;
|
|
|
|
struct_.struct_.on_browser_destroyed =
|
|
|
|
render_process_handler_on_browser_destroyed;
|
2013-09-13 01:36:54 +02:00
|
|
|
struct_.struct_.get_load_handler = render_process_handler_get_load_handler;
|
2013-11-21 21:59:28 +01:00
|
|
|
struct_.struct_.on_before_navigation =
|
|
|
|
render_process_handler_on_before_navigation;
|
2012-04-03 03:34:16 +02:00
|
|
|
struct_.struct_.on_context_created =
|
|
|
|
render_process_handler_on_context_created;
|
|
|
|
struct_.struct_.on_context_released =
|
|
|
|
render_process_handler_on_context_released;
|
2012-11-02 19:16:28 +01:00
|
|
|
struct_.struct_.on_uncaught_exception =
|
|
|
|
render_process_handler_on_uncaught_exception;
|
2012-06-11 17:52:49 +02:00
|
|
|
struct_.struct_.on_focused_node_changed =
|
|
|
|
render_process_handler_on_focused_node_changed;
|
2012-06-11 22:03:49 +02:00
|
|
|
struct_.struct_.on_process_message_received =
|
|
|
|
render_process_handler_on_process_message_received;
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#ifndef NDEBUG
|
|
|
|
template<> long CefCppToC<CefRenderProcessHandlerCppToC,
|
|
|
|
CefRenderProcessHandler, cef_render_process_handler_t>::DebugObjCt = 0;
|
|
|
|
#endif
|
|
|
|
|