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

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

Issue 525513003: Cleanup: Put more plugin code behind the ENABLE_PLUGINS ifdef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 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.cc ('k') | content/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 501ae9aa0f4ed99da6be0385031b7cc5c55f39de..b34f55c9edb9e37a8349a26317f054f8e799a196 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -180,7 +180,7 @@ const char kWebContentsAndroidKey[] = "web_contents_android";
base::LazyInstance<std::vector<WebContentsImpl::CreatedCallback> >
g_created_callbacks = LAZY_INSTANCE_INITIALIZER;
-static int StartDownload(content::RenderFrameHost* rfh,
+static int StartDownload(RenderFrameHost* rfh,
const GURL& url,
bool is_favicon,
uint32_t max_bitmap_size) {
@@ -576,10 +576,12 @@ bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host,
IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply)
IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed)
IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend)
+#if defined(ENABLE_PLUGINS)
IPC_MESSAGE_HANDLER(ViewHostMsg_RequestPpapiBrokerPermission,
OnRequestPpapiBrokerPermission)
IPC_MESSAGE_HANDLER_GENERIC(BrowserPluginHostMsg_Attach,
OnBrowserPluginMessage(message))
+#endif
IPC_MESSAGE_HANDLER(ImageHostMsg_DidDownloadImage, OnDidDownloadImage)
IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFaviconURL, OnUpdateFaviconURL)
IPC_MESSAGE_HANDLER(ViewHostMsg_ShowValidationMessage,
@@ -728,13 +730,11 @@ void WebContentsImpl::SetAccessibilityMode(AccessibilityMode mode) {
}
void WebContentsImpl::AddAccessibilityMode(AccessibilityMode mode) {
- SetAccessibilityMode(
- content::AddAccessibilityModeTo(accessibility_mode_, mode));
+ SetAccessibilityMode(AddAccessibilityModeTo(accessibility_mode_, mode));
}
void WebContentsImpl::RemoveAccessibilityMode(AccessibilityMode mode) {
- SetAccessibilityMode(
- content::RemoveAccessibilityModeFrom(accessibility_mode_, mode));
+ SetAccessibilityMode(RemoveAccessibilityModeFrom(accessibility_mode_, mode));
}
WebUI* WebContentsImpl::CreateWebUI(const GURL& url) {
@@ -1459,7 +1459,7 @@ void WebContentsImpl::CreateNewWindow(
if (process_handle != base::kNullProcessHandle) {
RecordAction(
base::UserMetricsAction("Terminate_ProcessMismatch_CreateNewWindow"));
- base::KillProcess(process_handle, content::RESULT_CODE_KILLED, false);
+ base::KillProcess(process_handle, RESULT_CODE_KILLED, false);
}
return;
}
@@ -1593,7 +1593,7 @@ void WebContentsImpl::CreateNewWidget(int render_process_id,
if (process_handle != base::kNullProcessHandle) {
RecordAction(
base::UserMetricsAction("Terminate_ProcessMismatch_CreateNewWidget"));
- base::KillProcess(process_handle, content::RESULT_CODE_KILLED, false);
+ base::KillProcess(process_handle, RESULT_CODE_KILLED, false);
}
return;
}
@@ -2937,6 +2937,7 @@ void WebContentsImpl::OnWebUISend(const GURL& source_url,
delegate_->WebUISend(this, source_url, name, args);
}
+#if defined(ENABLE_PLUGINS)
void WebContentsImpl::OnRequestPpapiBrokerPermission(
int routing_id,
const GURL& url,
@@ -2970,6 +2971,7 @@ void WebContentsImpl::OnBrowserPluginMessage(const IPC::Message& message) {
browser_plugin_embedder_.reset(BrowserPluginEmbedder::Create(this));
browser_plugin_embedder_->OnMessageReceived(message);
}
+#endif
void WebContentsImpl::OnDidDownloadImage(
int id,
@@ -3666,7 +3668,7 @@ void WebContentsImpl::DidAccessInitialDocument() {
controller_.DiscardPendingEntry();
// Update the URL display.
- NotifyNavigationStateChanged(content::INVALIDATE_TYPE_URL);
+ NotifyNavigationStateChanged(INVALIDATE_TYPE_URL);
}
void WebContentsImpl::DidDisownOpener(RenderFrameHost* render_frame_host) {
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698