mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Pass information to the renderer process synchronously on render thread creation and new browser creation to avoid race conditions (issue #744).
- Add the ability to pass extra information to child processes using a new CefBrowserProcessHandler::OnRenderProcessThreadCreated callback (issue #744). - Fix OnBeforeChildProcessLaunch documentation (issue #754). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@910 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -58,15 +58,17 @@ IPC_STRUCT_BEGIN(Cef_Response_Params)
|
||||
IPC_STRUCT_MEMBER(std::string, response)
|
||||
IPC_STRUCT_END()
|
||||
|
||||
// Parameters structure for a cross-origin white list entry.
|
||||
IPC_STRUCT_BEGIN(Cef_CrossOriginWhiteListEntry_Params)
|
||||
IPC_STRUCT_MEMBER(std::string, source_origin)
|
||||
IPC_STRUCT_MEMBER(std::string, target_protocol)
|
||||
IPC_STRUCT_MEMBER(std::string, target_domain)
|
||||
IPC_STRUCT_MEMBER(bool, allow_target_subdomains)
|
||||
IPC_STRUCT_END()
|
||||
|
||||
|
||||
// Messages sent from the browser to the renderer.
|
||||
|
||||
// Tell the renderer which browser window it's being attached to.
|
||||
IPC_MESSAGE_ROUTED2(CefMsg_UpdateBrowserWindowId,
|
||||
int /* browser_id */,
|
||||
bool /* is_popup */)
|
||||
|
||||
// Parameters for a resource request.
|
||||
IPC_STRUCT_BEGIN(CefMsg_LoadRequest_Params)
|
||||
// The request method: GET, POST, etc.
|
||||
@@ -121,12 +123,9 @@ IPC_MESSAGE_ROUTED1(CefMsg_ResponseAck,
|
||||
int /* request_id */)
|
||||
|
||||
// Sent to child processes to add or remove a cross-origin whitelist entry.
|
||||
IPC_MESSAGE_CONTROL5(CefProcessMsg_ModifyCrossOriginWhitelistEntry,
|
||||
IPC_MESSAGE_CONTROL2(CefProcessMsg_ModifyCrossOriginWhitelistEntry,
|
||||
bool /* add */,
|
||||
std::string /* source_origin */,
|
||||
std::string /* target_protocol */,
|
||||
std::string /* target_domain */,
|
||||
bool /* allow_target_subdomains */)
|
||||
Cef_CrossOriginWhiteListEntry_Params /* params */)
|
||||
|
||||
// Sent to child processes to clear the cross-origin whitelist.
|
||||
IPC_MESSAGE_CONTROL0(CefProcessMsg_ClearCrossOriginWhitelist)
|
||||
@@ -134,8 +133,30 @@ IPC_MESSAGE_CONTROL0(CefProcessMsg_ClearCrossOriginWhitelist)
|
||||
|
||||
// Messages sent from the renderer to the browser.
|
||||
|
||||
// Sent when the render thread has started and all filters are attached.
|
||||
IPC_MESSAGE_CONTROL0(CefProcessHostMsg_RenderThreadStarted)
|
||||
// Parameters for a newly created render thread.
|
||||
IPC_STRUCT_BEGIN(CefProcessHostMsg_GetNewRenderThreadInfo_Params)
|
||||
IPC_STRUCT_MEMBER(std::vector<Cef_CrossOriginWhiteListEntry_Params>,
|
||||
cross_origin_whitelist_entries)
|
||||
|
||||
IPC_STRUCT_MEMBER(ListValue, extra_info)
|
||||
IPC_STRUCT_END()
|
||||
|
||||
// Retrieve information about a newly created render thread.
|
||||
IPC_SYNC_MESSAGE_CONTROL0_1(
|
||||
CefProcessHostMsg_GetNewRenderThreadInfo,
|
||||
CefProcessHostMsg_GetNewRenderThreadInfo_Params /* params*/)
|
||||
|
||||
// Parameters for a newly created browser window.
|
||||
IPC_STRUCT_BEGIN(CefProcessHostMsg_GetNewBrowserInfo_Params)
|
||||
IPC_STRUCT_MEMBER(int, browser_id)
|
||||
IPC_STRUCT_MEMBER(bool, is_popup)
|
||||
IPC_STRUCT_END()
|
||||
|
||||
// Retrieve information about a newly created browser window.
|
||||
IPC_SYNC_MESSAGE_CONTROL1_1(
|
||||
CefProcessHostMsg_GetNewBrowserInfo,
|
||||
int /* routing_id */,
|
||||
CefProcessHostMsg_GetNewBrowserInfo_Params /* params*/)
|
||||
|
||||
// Sent when a frame is identified for the first time.
|
||||
IPC_MESSAGE_ROUTED3(CefHostMsg_FrameIdentified,
|
||||
|
@@ -38,6 +38,14 @@ CefRefPtr<CefBinaryValue> CefBinaryValueImpl::GetOrCreateRef(
|
||||
CefBinaryValueImpl::kReference, controller);
|
||||
}
|
||||
|
||||
CefBinaryValueImpl::CefBinaryValueImpl(base::BinaryValue* value,
|
||||
bool will_delete,
|
||||
bool read_only)
|
||||
: CefValueBase<CefBinaryValue, base::BinaryValue>(
|
||||
value, NULL, will_delete ? kOwnerWillDelete : kOwnerNoDelete,
|
||||
read_only, NULL) {
|
||||
}
|
||||
|
||||
base::BinaryValue* CefBinaryValueImpl::CopyValue() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
return const_value().DeepCopy();
|
||||
@@ -139,6 +147,14 @@ CefRefPtr<CefDictionaryValue> CefDictionaryValueImpl::GetOrCreateRef(
|
||||
CefDictionaryValueImpl::kReference, read_only, controller);
|
||||
}
|
||||
|
||||
CefDictionaryValueImpl::CefDictionaryValueImpl(base::DictionaryValue* value,
|
||||
bool will_delete,
|
||||
bool read_only)
|
||||
: CefValueBase<CefDictionaryValue, base::DictionaryValue>(
|
||||
value, NULL, will_delete ? kOwnerWillDelete : kOwnerNoDelete,
|
||||
read_only, NULL) {
|
||||
}
|
||||
|
||||
base::DictionaryValue* CefDictionaryValueImpl::CopyValue() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
return const_value().DeepCopy();
|
||||
@@ -487,6 +503,14 @@ CefRefPtr<CefListValue> CefListValueImpl::GetOrCreateRef(
|
||||
CefListValueImpl::kReference, read_only, controller);
|
||||
}
|
||||
|
||||
CefListValueImpl::CefListValueImpl(base::ListValue* value,
|
||||
bool will_delete,
|
||||
bool read_only)
|
||||
: CefValueBase<CefListValue, base::ListValue>(
|
||||
value, NULL, will_delete ? kOwnerWillDelete : kOwnerNoDelete,
|
||||
read_only, NULL) {
|
||||
}
|
||||
|
||||
base::ListValue* CefListValueImpl::CopyValue() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
return const_value().DeepCopy();
|
||||
|
@@ -25,6 +25,11 @@ class CefBinaryValueImpl
|
||||
void* parent_value,
|
||||
CefValueController* controller);
|
||||
|
||||
// Simple constructor for referencing existing value objects.
|
||||
CefBinaryValueImpl(base::BinaryValue* value,
|
||||
bool will_delete,
|
||||
bool read_only);
|
||||
|
||||
// Return a copy of the value.
|
||||
base::BinaryValue* CopyValue();
|
||||
|
||||
@@ -72,6 +77,11 @@ class CefDictionaryValueImpl
|
||||
bool read_only,
|
||||
CefValueController* controller);
|
||||
|
||||
// Simple constructor for referencing existing value objects.
|
||||
CefDictionaryValueImpl(base::DictionaryValue* value,
|
||||
bool will_delete,
|
||||
bool read_only);
|
||||
|
||||
// Return a copy of the value.
|
||||
base::DictionaryValue* CopyValue();
|
||||
|
||||
@@ -140,6 +150,11 @@ class CefListValueImpl
|
||||
bool read_only,
|
||||
CefValueController* controller);
|
||||
|
||||
// Simple constructor for referencing existing value objects.
|
||||
CefListValueImpl(base::ListValue* value,
|
||||
bool will_delete,
|
||||
bool read_only);
|
||||
|
||||
// Return a copy of the value.
|
||||
base::ListValue* CopyValue();
|
||||
|
||||
|
Reference in New Issue
Block a user