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

Unified Diff: chrome/browser/guest_view/web_view/context_menu_content_type_web_view.cc

Issue 1117893002: Moving extension code out of "components/" to avoid layering violations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nit. Created 5 years, 8 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: chrome/browser/guest_view/web_view/context_menu_content_type_web_view.cc
diff --git a/chrome/browser/guest_view/web_view/context_menu_content_type_web_view.cc b/chrome/browser/guest_view/web_view/context_menu_content_type_web_view.cc
index c8f60cdbb2c5f78ec07027476e7c4785506be4c1..9a3a9d5dee9a2112f6b1f57134532c76412b0125 100644
--- a/chrome/browser/guest_view/web_view/context_menu_content_type_web_view.cc
+++ b/chrome/browser/guest_view/web_view/context_menu_content_type_web_view.cc
@@ -8,9 +8,13 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
#include "extensions/browser/guest_view/web_view/web_view_guest.h"
+#include "extensions/browser/process_manager.h"
#include "extensions/common/extension.h"
#include "extensions/common/manifest.h"
+using extensions::Extension;
+using extensions::ProcessManager;
+
ContextMenuContentTypeWebView::ContextMenuContentTypeWebView(
content::WebContents* web_contents,
const content::ContextMenuParams& params)
@@ -20,6 +24,13 @@ ContextMenuContentTypeWebView::ContextMenuContentTypeWebView(
ContextMenuContentTypeWebView::~ContextMenuContentTypeWebView() {
}
+const Extension* ContextMenuContentTypeWebView::GetExtension() const {
+ ProcessManager* process_manager =
+ ProcessManager::Get(source_web_contents()->GetBrowserContext());
+ return process_manager->GetExtensionForWebContents(
+ source_web_contents());
+}
+
bool ContextMenuContentTypeWebView::SupportsGroup(int group) {
switch (group) {
case ITEM_GROUP_PAGE:

Powered by Google App Engine
This is Rietveld 408576698