diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-20 21:25:46 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-20 21:25:46 +0000 |
commit | 06828b988cdcfcadad4cb2032b768634356ba70e (patch) | |
tree | 5a3b9a1bc2687018398835dbf92d0f4aa6556731 /chrome/common/resource_dispatcher.cc | |
parent | 73dc4cf402ca37f51291d72572a8d4884ddddb2a (diff) | |
download | chromium_src-06828b988cdcfcadad4cb2032b768634356ba70e.zip chromium_src-06828b988cdcfcadad4cb2032b768634356ba70e.tar.gz chromium_src-06828b988cdcfcadad4cb2032b768634356ba70e.tar.bz2 |
This fixes http://code.google.com/p/chromium/issues/detail?id=205, which was an issue with a windowed flash instance not rendering content at times.The bug occurs as a result of the following:-1. The flash plugin executes a script via GetURLNotify. This script calls window.open with the target as self, which shows up as a new tab in the browser. This causes a new RenderView object to be instantiated (See RenderView::CreateWebView).2. RenderView::CreateWebView sends over the ViewHostMsg_CreateWindow IPC message to the browser. The handler in the browser sends over an ack for this message with the window handle. This is used as the parent window for any plugins instantiated in the page.3. At times, the newly created view starts receiving data which is processed before the ViewMsg_CreatingNew_ACK message is received and processed by the view. This causes the plugin to be instantiated without a parent window thus ending up as a top level window.The fix is to queue up resource messages and process them after we receive the ack for the ViewHostMsg_CreateWindow IPC.
Tests :- Covered by UI tests.
R=jam
Review URL: http://codereview.chromium.org/7514
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3631 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/resource_dispatcher.cc')
-rw-r--r-- | chrome/common/resource_dispatcher.cc | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/chrome/common/resource_dispatcher.cc b/chrome/common/resource_dispatcher.cc index e3099af..81ed5a2 100644 --- a/chrome/common/resource_dispatcher.cc +++ b/chrome/common/resource_dispatcher.cc @@ -244,15 +244,8 @@ ResourceDispatcher::~ResourceDispatcher() { // ResourceDispatcher implementation ------------------------------------------ bool ResourceDispatcher::OnMessageReceived(const IPC::Message& message) { - switch (message.type()) { - case ViewMsg_Resource_UploadProgress::ID: - case ViewMsg_Resource_ReceivedResponse::ID: - case ViewMsg_Resource_ReceivedRedirect::ID: - case ViewMsg_Resource_DataReceived::ID: - case ViewMsg_Resource_RequestComplete::ID: - break; - default: - return false; + if (!IsResourceMessage(message)) { + return false; } int request_id; @@ -508,3 +501,19 @@ webkit_glue::ResourceLoaderBridge* ResourceDispatcher::CreateBridge( request_context); } + +bool ResourceDispatcher::IsResourceMessage(const IPC::Message& message) const { + switch (message.type()) { + case ViewMsg_Resource_UploadProgress::ID: + case ViewMsg_Resource_ReceivedResponse::ID: + case ViewMsg_Resource_ReceivedRedirect::ID: + case ViewMsg_Resource_DataReceived::ID: + case ViewMsg_Resource_RequestComplete::ID: + return true; + + default: + break; + } + + return false; +}
\ No newline at end of file |