Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1192)

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 12518033: Browser Plugin: Only install BrowserPluginMessageFilter if render process supports BrowserPlugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/browser/site_instance_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index c186bd360568a77a36bb69e18019cef1c5031567..884bcc10fa1b7699b16b477049cf0e00d570809e 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -358,6 +358,7 @@ void RenderProcessHost::SetMaxRendererProcessCount(size_t count) {
RenderProcessHostImpl::RenderProcessHostImpl(
BrowserContext* browser_context,
StoragePartitionImpl* storage_partition_impl,
+ bool supports_browser_plugin,
bool is_guest)
: fast_shutdown_started_(false),
deleting_soon_(false),
@@ -376,6 +377,7 @@ RenderProcessHostImpl::RenderProcessHostImpl(
#if defined(OS_ANDROID)
dummy_shutdown_event_(false, false),
#endif
+ supports_browser_plugin_(supports_browser_plugin),
Charlie Reis 2013/03/21 01:09:39 Can you add a CHECK(!is_guest || supports_browser_
Fady Samuel 2013/03/21 02:51:13 No, unfortunately. is_guest does not imply suppor
is_guest_(is_guest) {
widget_helper_ = new RenderWidgetHelper();
@@ -529,11 +531,11 @@ void RenderProcessHostImpl::CreateMessageFilters() {
MediaInternals* media_internals = MediaInternals::GetInstance();;
// Add BrowserPluginMessageFilter to ensure it gets the first stab at messages
// from guests.
- // TODO(fsamuel): Call out to the ContentBrowserClient to decide whether or
- // not to install the BrowserPluginMessageFilter.
- scoped_refptr<BrowserPluginMessageFilter> bp_message_filter(
- new BrowserPluginMessageFilter(GetID(), IsGuest()));
- channel_->AddFilter(bp_message_filter);
+ if (supports_browser_plugin_) {
+ scoped_refptr<BrowserPluginMessageFilter> bp_message_filter(
+ new BrowserPluginMessageFilter(GetID(), IsGuest()));
+ channel_->AddFilter(bp_message_filter);
+ }
scoped_refptr<RenderMessageFilter> render_message_filter(
new RenderMessageFilter(
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/browser/site_instance_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698