summaryrefslogtreecommitdiffstats
path: root/content/browser/renderer_host/render_view_host_impl.cc
diff options
context:
space:
mode:
authorlazyboy@chromium.org <lazyboy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-20 15:35:12 +0000
committerlazyboy@chromium.org <lazyboy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-20 15:35:12 +0000
commit7f087fb3893209a9c1e34d9c3ebc04c74015576e (patch)
tree1ab1da1d2ec76e1e1f32da94c45aabb5352559a3 /content/browser/renderer_host/render_view_host_impl.cc
parentef935ae14a48169f3b81a46f3ce0e9a5a88bc3c9 (diff)
downloadchromium_src-7f087fb3893209a9c1e34d9c3ebc04c74015576e.zip
chromium_src-7f087fb3893209a9c1e34d9c3ebc04c74015576e.tar.gz
chromium_src-7f087fb3893209a9c1e34d9c3ebc04c74015576e.tar.bz2
This is followup from Charlie's comments on Fady's cl: http://chromiumcodereview.appspot.com/10560022, it seems I cannot upload patch to that issue (since I'm not owner), I'm creating a new one.
Split Embedder and Guest 'roles' for browser plugin, web contents can now play any or both roles, main idea is to have more readable separation between the two. Also stop creating browser_plugin counterpart in browser/host for every web_contents, instead create them only when there's a browser_plugin element. BUG= 141232 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=157650 Review URL: https://chromiumcodereview.appspot.com/10868012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157773 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/renderer_host/render_view_host_impl.cc')
-rw-r--r--content/browser/renderer_host/render_view_host_impl.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 6984a0d..7b99267 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -29,6 +29,7 @@
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/common/accessibility_messages.h"
+#include "content/common/browser_plugin_messages.h"
#include "content/common/content_constants_internal.h"
#include "content/common/desktop_notification_messages.h"
#include "content/common/drag_messages.h"
@@ -833,7 +834,17 @@ bool RenderViewHostImpl::SuddenTerminationAllowed() const {
// RenderViewHostImpl, IPC message handlers:
bool RenderViewHostImpl::OnMessageReceived(const IPC::Message& msg) {
- if (!BrowserMessageFilter::CheckCanDispatchOnUI(msg, this))
+ // Allow BrowserPluginHostMsg_* sync messages to run on the UI thread.
+ // Platform apps will not support windowed plugins so the deadlock cycle
+ // browser -> plugin -> renderer -> browser referred in
+ // BrowserMessageFilter::CheckCanDispatchOnUI() is not supposed to happen. If
+ // we want to support windowed plugins, sync messages in BrowserPlugin might
+ // need to be changed to async messages.
+ // TODO(fsamuel): Disallow BrowserPluginHostMsg_* sync messages to run on UI
+ // thread and make these messages async: http://crbug.com/149063.
+ if (msg.type() != BrowserPluginHostMsg_HandleInputEvent::ID &&
+ msg.type() != BrowserPluginHostMsg_ResizeGuest::ID &&
+ !BrowserMessageFilter::CheckCanDispatchOnUI(msg, this))
return true;
// Filter out most IPC messages if this renderer is swapped out.