2016-01-08 20:00:27 +01:00
|
|
|
// Copyright (c) 2016 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.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "libcef_dll/cpptoc/browser_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"
|
2013-11-21 21:59:28 +01:00
|
|
|
#include "libcef_dll/cpptoc/request_cpptoc.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
#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
|
|
|
#include "libcef_dll/ctocpp/render_process_handler_ctocpp.h"
|
|
|
|
|
|
|
|
|
|
|
|
// VIRTUAL METHODS - Body may be edited by hand.
|
|
|
|
|
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,
|
2012-11-20 21:08:36 +01:00
|
|
|
CefListValueCppToC::Wrap(extra_info));
|
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
|
|
|
}
|
|
|
|
|
|
|
|
void CefRenderProcessHandlerCToCpp::OnBrowserCreated(
|
|
|
|
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_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;
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
_struct->on_browser_created(_struct,
|
2012-04-03 03:34:16 +02:00
|
|
|
CefBrowserCppToC::Wrap(browser));
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
2015-04-26 20:40:01 +02:00
|
|
|
_struct->on_browser_destroyed(_struct,
|
2012-04-03 03:34:16 +02:00
|
|
|
CefBrowserCppToC::Wrap(browser));
|
|
|
|
}
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2013-11-21 21:59:28 +01:00
|
|
|
bool CefRenderProcessHandlerCToCpp::OnBeforeNavigation(
|
|
|
|
CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
|
|
|
|
CefRefPtr<CefRequest> request, NavigationType navigation_type,
|
|
|
|
bool is_redirect) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_render_process_handler_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_before_navigation))
|
2013-11-21 21:59:28 +01: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;
|
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame.get());
|
|
|
|
if (!frame.get())
|
|
|
|
return false;
|
|
|
|
// Verify param: request; type: refptr_diff
|
|
|
|
DCHECK(request.get());
|
|
|
|
if (!request.get())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->on_before_navigation(_struct,
|
2013-11-21 21:59:28 +01:00
|
|
|
CefBrowserCppToC::Wrap(browser),
|
|
|
|
CefFrameCppToC::Wrap(frame),
|
|
|
|
CefRequestCppToC::Wrap(request),
|
|
|
|
navigation_type,
|
|
|
|
is_redirect);
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
void CefRenderProcessHandlerCToCpp::OnContextCreated(
|
|
|
|
CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
|
|
|
|
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
|
2015-04-26 20:40:01 +02:00
|
|
|
_struct->on_context_created(_struct,
|
2012-04-03 03:34:16 +02:00
|
|
|
CefBrowserCppToC::Wrap(browser),
|
|
|
|
CefFrameCppToC::Wrap(frame),
|
|
|
|
CefV8ContextCppToC::Wrap(context));
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefRenderProcessHandlerCToCpp::OnContextReleased(
|
|
|
|
CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
|
|
|
|
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
|
2015-04-26 20:40:01 +02:00
|
|
|
_struct->on_context_released(_struct,
|
2012-04-03 03:34:16 +02:00
|
|
|
CefBrowserCppToC::Wrap(browser),
|
|
|
|
CefFrameCppToC::Wrap(frame),
|
|
|
|
CefV8ContextCppToC::Wrap(context));
|
|
|
|
}
|
|
|
|
|
2012-11-02 19:16:28 +01:00
|
|
|
void CefRenderProcessHandlerCToCpp::OnUncaughtException(
|
|
|
|
CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
|
|
|
|
CefRefPtr<CefV8Context> context, CefRefPtr<CefV8Exception> exception,
|
|
|
|
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
|
2015-04-26 20:40:01 +02:00
|
|
|
_struct->on_uncaught_exception(_struct,
|
2012-11-02 19:16:28 +01:00
|
|
|
CefBrowserCppToC::Wrap(browser),
|
|
|
|
CefFrameCppToC::Wrap(frame),
|
|
|
|
CefV8ContextCppToC::Wrap(context),
|
|
|
|
CefV8ExceptionCppToC::Wrap(exception),
|
|
|
|
CefV8StackTraceCppToC::Wrap(stackTrace));
|
|
|
|
}
|
|
|
|
|
2012-06-11 17:52:49 +02:00
|
|
|
void CefRenderProcessHandlerCToCpp::OnFocusedNodeChanged(
|
|
|
|
CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
|
|
|
|
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
|
2015-04-26 20:40:01 +02:00
|
|
|
_struct->on_focused_node_changed(_struct,
|
2012-06-11 17:52:49 +02:00
|
|
|
CefBrowserCppToC::Wrap(browser),
|
|
|
|
CefFrameCppToC::Wrap(frame),
|
|
|
|
CefDOMNodeCppToC::Wrap(node));
|
|
|
|
}
|
|
|
|
|
2012-06-11 22:03:49 +02:00
|
|
|
bool CefRenderProcessHandlerCToCpp::OnProcessMessageReceived(
|
2012-04-03 03:34:16 +02:00
|
|
|
CefRefPtr<CefBrowser> browser, CefProcessId source_process,
|
|
|
|
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;
|
|
|
|
// Verify param: message; type: refptr_diff
|
|
|
|
DCHECK(message.get());
|
|
|
|
if (!message.get())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->on_process_message_received(_struct,
|
2012-04-03 03:34:16 +02:00
|
|
|
CefBrowserCppToC::Wrap(browser),
|
|
|
|
source_process,
|
|
|
|
CefProcessMessageCppToC::Wrap(message));
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefRenderProcessHandlerCToCpp::CefRenderProcessHandlerCToCpp() {
|
|
|
|
}
|
|
|
|
|
|
|
|
template<> cef_render_process_handler_t* CefCToCpp<CefRenderProcessHandlerCToCpp,
|
|
|
|
CefRenderProcessHandler, cef_render_process_handler_t>::UnwrapDerived(
|
|
|
|
CefWrapperType type, CefRenderProcessHandler* c) {
|
|
|
|
NOTREACHED() << "Unexpected class type: " << type;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2016-09-01 13:24:30 +02:00
|
|
|
#if DCHECK_IS_ON()
|
2014-07-15 00:18:51 +02:00
|
|
|
template<> base::AtomicRefCount CefCToCpp<CefRenderProcessHandlerCToCpp,
|
2012-04-03 03:34:16 +02:00
|
|
|
CefRenderProcessHandler, cef_render_process_handler_t>::DebugObjCt = 0;
|
|
|
|
#endif
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
template<> CefWrapperType CefCToCpp<CefRenderProcessHandlerCToCpp,
|
|
|
|
CefRenderProcessHandler, cef_render_process_handler_t>::kWrapperType =
|
|
|
|
WT_RENDER_PROCESS_HANDLER;
|