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

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

Issue 11615002: Exclude PluginService for builds with enable_plugins==0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove debug logging Created 8 years 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
Index: content/browser/renderer_host/render_message_filter.cc
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index 0823310897e723e7b076dd8c4b8d6ebaa3a5df2b..0eccd0c46d599c179769c0c2b30f653655b7b1dd 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -329,6 +329,7 @@ RenderMessageFilter::~RenderMessageFilter() {
void RenderMessageFilter::OnChannelClosing() {
BrowserMessageFilter::OnChannelClosing();
+#if defined(ENABLE_PLUGINS)
for (std::set<OpenChannelToNpapiPluginCallback*>::iterator it =
plugin_host_clients_.begin(); it != plugin_host_clients_.end(); ++it) {
OpenChannelToNpapiPluginCallback* client = *it;
@@ -343,6 +344,7 @@ void RenderMessageFilter::OnChannelClosing() {
}
client->Cancel();
}
+#endif // defined(ENABLE_PLUGINS)
plugin_host_clients_.clear();
}
@@ -381,11 +383,11 @@ bool RenderMessageFilter::OnMessageReceived(const IPC::Message& message,
IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_LoadFont, OnLoadFont)
#endif
IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_GetPlugins, OnGetPlugins)
- IPC_MESSAGE_HANDLER(ViewHostMsg_GetPluginInfo, OnGetPluginInfo)
IPC_MESSAGE_HANDLER(ViewHostMsg_DownloadUrl, OnDownloadUrl)
+#if defined(ENABLE_PLUGINS)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_GetPluginInfo, OnGetPluginInfo)
IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_OpenChannelToPlugin,
OnOpenChannelToPlugin)
-#if defined(ENABLE_PLUGINS)
IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_OpenChannelToPepperPlugin,
OnOpenChannelToPepperPlugin)
IPC_MESSAGE_HANDLER(ViewHostMsg_DidCreateOutOfProcessPepperInstance,
@@ -624,6 +626,12 @@ void RenderMessageFilter::SendLoadFontReply(IPC::Message* reply,
void RenderMessageFilter::OnGetPlugins(
jam 2012/12/19 01:55:15 how about not sending this IPC altogether?
nilesh 2012/12/19 21:07:44 Done. Added code in content/renderer/renderer_webk
bool refresh,
IPC::Message* reply_msg) {
+#if !defined(ENABLE_PLUGINS)
+ // Send an empty list.
+ const std::vector<webkit::WebPluginInfo> plugin_info_empty;
+ ViewHostMsg_GetPlugins::WriteReplyParams(reply_msg, plugin_info_empty);
+ Send(reply_msg);
+#else
// Don't refresh if the specified threshold has not been passed. Note that
// this check is performed before off-loading to the file thread. The reason
// we do this is that some pages tend to request that the list of plugins be
@@ -643,6 +651,7 @@ void RenderMessageFilter::OnGetPlugins(
PluginServiceImpl::GetInstance()->GetPlugins(
base::Bind(&RenderMessageFilter::GetPluginsCallback, this, reply_msg));
+#endif
}
void RenderMessageFilter::GetPluginsCallback(

Powered by Google App Engine
This is Rietveld 408576698