- 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:
Marshall Greenblatt
2012-11-20 20:08:36 +00:00
parent 8a504d3d25
commit 1e871cc2c8
32 changed files with 957 additions and 234 deletions

View File

@ -250,10 +250,12 @@ bool CefBrowserImpl::SendProcessMessage(CefProcessId target_process,
// CefBrowserImpl public methods.
// -----------------------------------------------------------------------------
CefBrowserImpl::CefBrowserImpl(content::RenderView* render_view)
CefBrowserImpl::CefBrowserImpl(content::RenderView* render_view,
int browser_id,
bool is_popup)
: content::RenderViewObserver(render_view),
browser_window_id_(kInvalidBrowserId),
is_popup_(false),
browser_window_id_(browser_id),
is_popup_(is_popup),
last_focused_frame_id_(kInvalidFrameId) {
response_manager_.reset(new CefResponseManager);
}
@ -547,8 +549,6 @@ void CefBrowserImpl::DidCreateDataSource(WebKit::WebFrame* frame,
bool CefBrowserImpl::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(CefBrowserImpl, message)
IPC_MESSAGE_HANDLER(CefMsg_UpdateBrowserWindowId,
OnUpdateBrowserWindowId)
IPC_MESSAGE_HANDLER(CefMsg_Request, OnRequest)
IPC_MESSAGE_HANDLER(CefMsg_Response, OnResponse)
IPC_MESSAGE_HANDLER(CefMsg_ResponseAck, OnResponseAck)
@ -562,23 +562,6 @@ bool CefBrowserImpl::OnMessageReceived(const IPC::Message& message) {
// RenderViewObserver::OnMessageReceived message handlers.
// -----------------------------------------------------------------------------
void CefBrowserImpl::OnUpdateBrowserWindowId(int window_id, bool is_popup) {
// This message should only be sent one time.
DCHECK(browser_window_id_ == kInvalidBrowserId);
browser_window_id_ = window_id;
is_popup_ = is_popup;
// Notify that the browser window has been created.
CefRefPtr<CefApp> app = CefContentClient::Get()->application();
if (app.get()) {
CefRefPtr<CefRenderProcessHandler> handler =
app->GetRenderProcessHandler();
if (handler.get())
handler->OnBrowserCreated(this);
}
}
void CefBrowserImpl::OnRequest(const Cef_Request_Params& params) {
bool success = false;
std::string response;