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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 688343003: Add some missing ENABLE_PLUGINS ifdefs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 7ce5ac24f15e3af3258d8dbdd18c69eaf6017762..b5573981aac27e42f38d7ad08a3266e527256260 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -495,8 +495,6 @@ bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host,
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(WebContentsImpl, message)
- IPC_MESSAGE_HANDLER(FrameHostMsg_PepperPluginHung, OnPepperPluginHung)
- IPC_MESSAGE_HANDLER(FrameHostMsg_PluginCrashed, OnPluginCrashed)
IPC_MESSAGE_HANDLER(FrameHostMsg_DomOperationResponse,
OnDomOperationResponse)
IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeThemeColor,
@@ -535,6 +533,8 @@ bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host,
IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed)
IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend)
#if defined(ENABLE_PLUGINS)
+ IPC_MESSAGE_HANDLER(FrameHostMsg_PepperPluginHung, OnPepperPluginHung)
+ IPC_MESSAGE_HANDLER(FrameHostMsg_PluginCrashed, OnPluginCrashed)
IPC_MESSAGE_HANDLER(ViewHostMsg_RequestPpapiBrokerPermission,
OnRequestPpapiBrokerPermission)
IPC_MESSAGE_HANDLER_GENERIC(BrowserPluginHostMsg_Attach,
@@ -2887,24 +2887,8 @@ void WebContentsImpl::OnOpenDateTimeDialog(
value.step,
value.suggestions);
}
-
#endif
-void WebContentsImpl::OnPepperPluginHung(int plugin_child_id,
- const base::FilePath& path,
- bool is_hung) {
- UMA_HISTOGRAM_COUNTS("Pepper.PluginHung", 1);
-
- FOR_EACH_OBSERVER(WebContentsObserver, observers_,
- PluginHungStatusChanged(plugin_child_id, path, is_hung));
-}
-
-void WebContentsImpl::OnPluginCrashed(const base::FilePath& plugin_path,
- base::ProcessId plugin_pid) {
- FOR_EACH_OBSERVER(WebContentsObserver, observers_,
- PluginCrashed(plugin_path, plugin_pid));
-}
-
void WebContentsImpl::OnDomOperationResponse(const std::string& json_string,
int automation_id) {
DomOperationNotificationDetails details(json_string, automation_id);
@@ -2963,6 +2947,21 @@ void WebContentsImpl::OnWebUISend(const GURL& source_url,
}
#if defined(ENABLE_PLUGINS)
+void WebContentsImpl::OnPepperPluginHung(int plugin_child_id,
+ const base::FilePath& path,
+ bool is_hung) {
+ UMA_HISTOGRAM_COUNTS("Pepper.PluginHung", 1);
+
+ FOR_EACH_OBSERVER(WebContentsObserver, observers_,
+ PluginHungStatusChanged(plugin_child_id, path, is_hung));
+}
+
+void WebContentsImpl::OnPluginCrashed(const base::FilePath& plugin_path,
+ base::ProcessId plugin_pid) {
+ FOR_EACH_OBSERVER(WebContentsObserver, observers_,
+ PluginCrashed(plugin_path, plugin_pid));
+}
+
void WebContentsImpl::OnRequestPpapiBrokerPermission(
int routing_id,
const GURL& url,
@@ -2996,7 +2995,7 @@ void WebContentsImpl::OnBrowserPluginMessage(const IPC::Message& message) {
browser_plugin_embedder_.reset(BrowserPluginEmbedder::Create(this));
browser_plugin_embedder_->OnMessageReceived(message);
}
-#endif
+#endif // defined(ENABLE_PLUGINS)
void WebContentsImpl::OnDidDownloadImage(
int id,

Powered by Google App Engine
This is Rietveld 408576698