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

Unified Diff: components/renderer_context_menu/context_menu_content_type.cc

Issue 535773002: Android: Remove more browser extensions code, including some that snuck back in. (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
Index: components/renderer_context_menu/context_menu_content_type.cc
diff --git a/components/renderer_context_menu/context_menu_content_type.cc b/components/renderer_context_menu/context_menu_content_type.cc
index a187d1feb18c919634721a4a5cf94ad09486587c..befb042a96c652757a6e21f32917b0de050e0e4e 100644
--- a/components/renderer_context_menu/context_menu_content_type.cc
+++ b/components/renderer_context_menu/context_menu_content_type.cc
@@ -7,14 +7,20 @@
#include "base/bind.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/url_constants.h"
+#include "third_party/WebKit/public/web/WebContextMenuData.h"
+
+#if defined(ENABLE_EXTENSIONS)
#include "extensions/browser/extension_system.h"
#include "extensions/browser/process_manager.h"
#include "extensions/common/extension.h"
-#include "third_party/WebKit/public/web/WebContextMenuData.h"
+#endif
using blink::WebContextMenuData;
using content::WebContents;
+
+#if defined(ENABLE_EXTENSIONS)
using extensions::Extension;
+#endif
namespace {
@@ -42,6 +48,7 @@ ContextMenuContentType::ContextMenuContentType(
ContextMenuContentType::~ContextMenuContentType() {
}
+#if defined(ENABLE_EXTENSIONS)
const Extension* ContextMenuContentType::GetExtension() const {
extensions::ExtensionSystem* system = extensions::ExtensionSystem::Get(
source_web_contents_->GetBrowserContext());
@@ -52,6 +59,7 @@ const Extension* ContextMenuContentType::GetExtension() const {
return system->process_manager()->GetExtensionForRenderViewHost(
source_web_contents_->GetRenderViewHost());
}
+#endif
bool ContextMenuContentType::SupportsGroup(int group) {
const bool has_selection = !params_.selection_text.empty();
@@ -109,7 +117,6 @@ bool ContextMenuContentType::SupportsGroupInternal(int group) {
}
case ITEM_GROUP_FRAME: {
-
bool page_group_supported = SupportsGroupInternal(ITEM_GROUP_PAGE);
return page_group_supported && !params_.frame_url.is_empty() &&
!IsInternalResourcesURL(params_.page_url);
« no previous file with comments | « chrome/chrome_browser_extensions.gypi ('k') | components/renderer_context_menu/render_view_context_menu_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698