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

Side by Side Diff: chrome/browser/renderer_context_menu/render_view_context_menu.cc

Issue 2512563003: Convert enable_plugins to a buildflag header. (Closed)
Patch Set: Merge Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h" 5 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 #include "content/public/browser/render_view_host.h" 100 #include "content/public/browser/render_view_host.h"
101 #include "content/public/browser/render_widget_host_view.h" 101 #include "content/public/browser/render_widget_host_view.h"
102 #include "content/public/browser/ssl_status.h" 102 #include "content/public/browser/ssl_status.h"
103 #include "content/public/browser/storage_partition.h" 103 #include "content/public/browser/storage_partition.h"
104 #include "content/public/browser/user_metrics.h" 104 #include "content/public/browser/user_metrics.h"
105 #include "content/public/browser/web_contents.h" 105 #include "content/public/browser/web_contents.h"
106 #include "content/public/common/menu_item.h" 106 #include "content/public/common/menu_item.h"
107 #include "content/public/common/url_utils.h" 107 #include "content/public/common/url_utils.h"
108 #include "extensions/features/features.h" 108 #include "extensions/features/features.h"
109 #include "net/base/escape.h" 109 #include "net/base/escape.h"
110 #include "ppapi/features/features.h"
110 #include "printing/features/features.h" 111 #include "printing/features/features.h"
111 #include "third_party/WebKit/public/public_features.h" 112 #include "third_party/WebKit/public/public_features.h"
112 #include "third_party/WebKit/public/web/WebContextMenuData.h" 113 #include "third_party/WebKit/public/web/WebContextMenuData.h"
113 #include "third_party/WebKit/public/web/WebMediaPlayerAction.h" 114 #include "third_party/WebKit/public/web/WebMediaPlayerAction.h"
114 #include "third_party/WebKit/public/web/WebPluginAction.h" 115 #include "third_party/WebKit/public/web/WebPluginAction.h"
115 #include "ui/base/clipboard/clipboard.h" 116 #include "ui/base/clipboard/clipboard.h"
116 #include "ui/base/clipboard/scoped_clipboard_writer.h" 117 #include "ui/base/clipboard/scoped_clipboard_writer.h"
117 #include "ui/base/l10n/l10n_util.h" 118 #include "ui/base/l10n/l10n_util.h"
118 #include "ui/gfx/canvas.h" 119 #include "ui/gfx/canvas.h"
119 #include "ui/gfx/favicon_size.h" 120 #include "ui/gfx/favicon_size.h"
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 bool RenderViewContextMenu::IsHTML5Fullscreen() const { 904 bool RenderViewContextMenu::IsHTML5Fullscreen() const {
904 Browser* browser = chrome::FindBrowserWithWebContents(source_web_contents_); 905 Browser* browser = chrome::FindBrowserWithWebContents(source_web_contents_);
905 if (!browser) 906 if (!browser)
906 return false; 907 return false;
907 908
908 FullscreenController* controller = 909 FullscreenController* controller =
909 browser->exclusive_access_manager()->fullscreen_controller(); 910 browser->exclusive_access_manager()->fullscreen_controller();
910 return controller->IsTabFullscreen(); 911 return controller->IsTabFullscreen();
911 } 912 }
912 913
913 #if defined(ENABLE_PLUGINS) 914 #if BUILDFLAG(ENABLE_PLUGINS)
914 void RenderViewContextMenu::HandleAuthorizeAllPlugins() { 915 void RenderViewContextMenu::HandleAuthorizeAllPlugins() {
915 ChromePluginServiceFilter::GetInstance()->AuthorizeAllPlugins( 916 ChromePluginServiceFilter::GetInstance()->AuthorizeAllPlugins(
916 source_web_contents_, false, std::string()); 917 source_web_contents_, false, std::string());
917 } 918 }
918 #endif 919 #endif
919 920
920 void RenderViewContextMenu::AppendPrintPreviewItems() { 921 void RenderViewContextMenu::AppendPrintPreviewItems() {
921 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) 922 #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
922 if (!print_preview_menu_observer_.get()) { 923 if (!print_preview_menu_observer_.get()) {
923 print_preview_menu_observer_.reset( 924 print_preview_menu_observer_.reset(
(...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after
2501 void RenderViewContextMenu::PluginActionAt( 2502 void RenderViewContextMenu::PluginActionAt(
2502 const gfx::Point& location, 2503 const gfx::Point& location,
2503 const WebPluginAction& action) { 2504 const WebPluginAction& action) {
2504 source_web_contents_->GetRenderViewHost()-> 2505 source_web_contents_->GetRenderViewHost()->
2505 ExecutePluginActionAtLocation(location, action); 2506 ExecutePluginActionAtLocation(location, action);
2506 } 2507 }
2507 2508
2508 Browser* RenderViewContextMenu::GetBrowser() const { 2509 Browser* RenderViewContextMenu::GetBrowser() const {
2509 return chrome::FindBrowserWithWebContents(embedder_web_contents_); 2510 return chrome::FindBrowserWithWebContents(embedder_web_contents_);
2510 } 2511 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698