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

Unified Diff: chrome/browser/renderer_context_menu/render_view_context_menu.cc

Issue 2479593006: Move enable extensions define to a build flag. (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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_context_menu/render_view_context_menu.cc
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.cc b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
index d90554841fdd5aa629b7f9f58ede9a36cee54ce4..a479ce178166dd19e634a6c7fb6b1c5c0a2802d9 100644
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -104,6 +104,7 @@
#include "content/public/browser/web_contents.h"
#include "content/public/common/menu_item.h"
#include "content/public/common/url_utils.h"
+#include "extensions/features/features.h"
#include "net/base/escape.h"
#include "printing/features/features.h"
#include "third_party/WebKit/public/public_features.h"
@@ -124,7 +125,7 @@
#include "chrome/browser/renderer_context_menu/spelling_options_submenu_observer.h"
#endif
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/devtools_util.h"
#include "chrome/browser/extensions/extension_service.h"
#include "extensions/browser/extension_host.h"
@@ -407,7 +408,7 @@ content::Referrer CreateReferrer(const GURL& url,
}
content::WebContents* GetWebContentsToUse(content::WebContents* web_contents) {
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
// If we're viewing in a MimeHandlerViewGuest, use its embedder WebContents.
if (extensions::MimeHandlerViewGuest::FromWebContents(web_contents)) {
WebContents* top_level_web_contents =
@@ -502,7 +503,7 @@ void OnProfileCreated(const GURL& link_url,
gfx::Vector2d RenderViewContextMenu::GetOffset(
RenderFrameHost* render_frame_host) {
gfx::Vector2d offset;
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
// When --use-cross-process-frames-for-guests is enabled, the position is
// transformed in the browser process hittesting code.
WebContents* web_contents =
@@ -520,7 +521,7 @@ gfx::Vector2d RenderViewContextMenu::GetOffset(
offset = bounds.origin() - top_level_bounds.origin();
}
}
-#endif // defined(ENABLE_EXTENSIONS)
+#endif // BUILDFLAG(ENABLE_EXTENSIONS)
return offset;
}
@@ -590,7 +591,7 @@ RenderViewContextMenu::~RenderViewContextMenu() {
// Menu construction functions -------------------------------------------------
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
// static
bool RenderViewContextMenu::ExtensionContextAndPatternMatch(
const content::ContextMenuParams& params,
@@ -738,7 +739,7 @@ void RenderViewContextMenu::AppendCurrentExtensionItems() {
extension_items_.AppendExtensionItems(key, PrintableSelectionText(), &index,
false /* is_action_menu */);
}
-#endif // defined(ENABLE_EXTENSIONS)
+#endif // BUILDFLAG(ENABLE_EXTENSIONS)
void RenderViewContextMenu::InitMenu() {
RenderViewContextMenuBase::InitMenu();

Powered by Google App Engine
This is Rietveld 408576698