mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add |extra_info| parameter for browser creation (fixes issue #1088)
The optional |extra_info| parameter provides an opportunity to specify extra information specific to the created browser that will be passed to CefRenderProcessHandler::OnBrowserCreated() in the render process.
This commit is contained in:
committed by
Marshall Greenblatt
parent
ad4ce5f441
commit
473c29a70d
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=15f23de47af54fa690b6c5810e3049f97ae2aabd$
|
||||
// $hash=2385e0531c91a419fe7f4036b5a59da743b1622e$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_
|
||||
@@ -869,25 +869,33 @@ typedef struct _cef_browser_host_t {
|
||||
// |windowInfo|. All values will be copied internally and the actual window will
|
||||
// be created on the UI thread. If |request_context| is NULL the global request
|
||||
// context will be used. This function can be called on any browser process
|
||||
// thread and will not block.
|
||||
// thread and will not block. The optional |extra_info| parameter provides an
|
||||
// opportunity to specify extra information specific to the created browser that
|
||||
// will be passed to cef_render_process_handler_t::on_browser_created() in the
|
||||
// render process.
|
||||
///
|
||||
CEF_EXPORT int cef_browser_host_create_browser(
|
||||
const cef_window_info_t* windowInfo,
|
||||
struct _cef_client_t* client,
|
||||
const cef_string_t* url,
|
||||
const struct _cef_browser_settings_t* settings,
|
||||
struct _cef_dictionary_value_t* extra_info,
|
||||
struct _cef_request_context_t* request_context);
|
||||
|
||||
///
|
||||
// Create a new browser window using the window parameters specified by
|
||||
// |windowInfo|. If |request_context| is NULL the global request context will be
|
||||
// used. This function can only be called on the browser process UI thread.
|
||||
// used. This function can only be called on the browser process UI thread. The
|
||||
// optional |extra_info| parameter provides an opportunity to specify extra
|
||||
// information specific to the created browser that will be passed to
|
||||
// cef_render_process_handler_t::on_browser_created() in the render process.
|
||||
///
|
||||
CEF_EXPORT cef_browser_t* cef_browser_host_create_browser_sync(
|
||||
const cef_window_info_t* windowInfo,
|
||||
struct _cef_client_t* client,
|
||||
const cef_string_t* url,
|
||||
const struct _cef_browser_settings_t* settings,
|
||||
struct _cef_dictionary_value_t* extra_info,
|
||||
struct _cef_request_context_t* request_context);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=a1648c803a6d72e004e523cd4c02530702635d1e$
|
||||
// $hash=9756fec933d13ecb320b0ec8c3bd8c9fcddfef47$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_LIFE_SPAN_HANDLER_CAPI_H_
|
||||
@@ -80,7 +80,10 @@ typedef struct _cef_life_span_handler_t {
|
||||
// modifications to |windowInfo| will be ignored if the parent browser is
|
||||
// wrapped in a cef_browser_view_t. Popup browser creation will be canceled if
|
||||
// the parent browser is destroyed before the popup browser creation completes
|
||||
// (indicated by a call to OnAfterCreated for the popup browser).
|
||||
// (indicated by a call to OnAfterCreated for the popup browser). The
|
||||
// |extra_info| parameter provides an opportunity to specify extra information
|
||||
// specific to the created popup browser that will be passed to
|
||||
// cef_render_process_handler_t::on_browser_created() in the render process.
|
||||
///
|
||||
int(CEF_CALLBACK* on_before_popup)(
|
||||
struct _cef_life_span_handler_t* self,
|
||||
@@ -94,6 +97,7 @@ typedef struct _cef_life_span_handler_t {
|
||||
struct _cef_window_info_t* windowInfo,
|
||||
struct _cef_client_t** client,
|
||||
struct _cef_browser_settings_t* settings,
|
||||
struct _cef_dictionary_value_t** extra_info,
|
||||
int* no_javascript_access);
|
||||
|
||||
///
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=63544b02e263d0aeb2f6553bf40c52bcf72d9f0b$
|
||||
// $hash=a3cf58db4b29d7395975ab8d63461b5ea8aad064$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_RENDER_PROCESS_HANDLER_CAPI_H_
|
||||
@@ -83,11 +83,16 @@ typedef struct _cef_render_process_handler_t {
|
||||
///
|
||||
// Called after a browser has been created. When browsing cross-origin a new
|
||||
// browser will be created before the old browser with the same identifier is
|
||||
// destroyed.
|
||||
// destroyed. |extra_info| is a read-only value originating from
|
||||
// cef_browser_host_t::cef_browser_host_create_browser(),
|
||||
// cef_browser_host_t::cef_browser_host_create_browser_sync(),
|
||||
// cef_life_span_handler_t::on_before_popup() or
|
||||
// cef_browser_view_t::cef_browser_view_create().
|
||||
///
|
||||
void(CEF_CALLBACK* on_browser_created)(
|
||||
struct _cef_render_process_handler_t* self,
|
||||
struct _cef_browser_t* browser);
|
||||
struct _cef_browser_t* browser,
|
||||
struct _cef_dictionary_value_t* extra_info);
|
||||
|
||||
///
|
||||
// Called before a browser is destroyed.
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=c499099d6f628e58d2eed207537817758161af5d$
|
||||
// $hash=400746f8fac7fa3dba7ee889c10ae6ca22b93fe1$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_CAPI_H_
|
||||
@@ -80,12 +80,16 @@ typedef struct _cef_browser_view_t {
|
||||
|
||||
///
|
||||
// Create a new BrowserView. The underlying cef_browser_t will not be created
|
||||
// until this view is added to the views hierarchy.
|
||||
// until this view is added to the views hierarchy. The optional |extra_info|
|
||||
// parameter provides an opportunity to specify extra information specific to
|
||||
// the created browser that will be passed to
|
||||
// cef_render_process_handler_t::on_browser_created() in the render process.
|
||||
///
|
||||
CEF_EXPORT cef_browser_view_t* cef_browser_view_create(
|
||||
struct _cef_client_t* client,
|
||||
const cef_string_t* url,
|
||||
const struct _cef_browser_settings_t* settings,
|
||||
struct _cef_dictionary_value_t* extra_info,
|
||||
struct _cef_request_context_t* request_context,
|
||||
struct _cef_browser_view_delegate_t* delegate);
|
||||
|
||||
|
Reference in New Issue
Block a user