Add CefBrowserProcessHandler::OnBeforeChildProcessLaunch and CefCommandLine::PrependWrapper to support custom construction of the command line for child processes (issue #628).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@810 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-09-27 17:07:31 +00:00
parent cc3b8c9cf3
commit 8957947cff
13 changed files with 127 additions and 0 deletions

View File

@@ -12,6 +12,7 @@
#include "libcef_dll/cpptoc/browser_process_handler_cpptoc.h"
#include "libcef_dll/cpptoc/proxy_handler_cpptoc.h"
#include "libcef_dll/ctocpp/command_line_ctocpp.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
@@ -44,6 +45,24 @@ void CEF_CALLBACK browser_process_handler_on_context_initialized(
CefBrowserProcessHandlerCppToC::Get(self)->OnContextInitialized();
}
void CEF_CALLBACK browser_process_handler_on_before_child_process_launch(
struct _cef_browser_process_handler_t* self,
struct _cef_command_line_t* command_line) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: command_line; type: refptr_diff
DCHECK(command_line);
if (!command_line)
return;
// Execute
CefBrowserProcessHandlerCppToC::Get(self)->OnBeforeChildProcessLaunch(
CefCommandLineCToCpp::Wrap(command_line));
}
// CONSTRUCTOR - Do not edit by hand.
@@ -54,6 +73,8 @@ CefBrowserProcessHandlerCppToC::CefBrowserProcessHandlerCppToC(
struct_.struct_.get_proxy_handler = browser_process_handler_get_proxy_handler;
struct_.struct_.on_context_initialized =
browser_process_handler_on_context_initialized;
struct_.struct_.on_before_child_process_launch =
browser_process_handler_on_before_child_process_launch;
}
#ifndef NDEBUG

View File

@@ -375,6 +375,23 @@ void CEF_CALLBACK command_line_append_argument(struct _cef_command_line_t* self,
CefString(argument));
}
void CEF_CALLBACK command_line_prepend_wrapper(struct _cef_command_line_t* self,
const cef_string_t* wrapper) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: wrapper; type: string_byref_const
DCHECK(wrapper);
if (!wrapper)
return;
// Execute
CefCommandLineCppToC::Get(self)->PrependWrapper(
CefString(wrapper));
}
// CONSTRUCTOR - Do not edit by hand.
@@ -401,6 +418,7 @@ CefCommandLineCppToC::CefCommandLineCppToC(CefCommandLine* cls)
struct_.struct_.has_arguments = command_line_has_arguments;
struct_.struct_.get_arguments = command_line_get_arguments;
struct_.struct_.append_argument = command_line_append_argument;
struct_.struct_.prepend_wrapper = command_line_prepend_wrapper;
}
#ifndef NDEBUG