Index: chrome/browser/renderer_context_menu/context_menu_content_type_platform_app.cc |
diff --git a/chrome/browser/renderer_context_menu/context_menu_content_type_platform_app.cc b/chrome/browser/renderer_context_menu/context_menu_content_type_platform_app.cc |
index 9fdf92d07248cc02968b34b2aa3bf344490c3ccc..1e7d66dca053fe393aa69c8029ab306883ee6d54 100644 |
--- a/chrome/browser/renderer_context_menu/context_menu_content_type_platform_app.cc |
+++ b/chrome/browser/renderer_context_menu/context_menu_content_type_platform_app.cc |
@@ -6,9 +6,16 @@ |
#include "base/command_line.h" |
#include "chrome/common/chrome_switches.h" |
+#include "content/public/browser/web_contents.h" |
+#include "extensions/browser/process_manager.h" |
#include "extensions/common/extension.h" |
#include "extensions/common/manifest.h" |
+#if defined(ENABLE_EXTENSIONS) |
+using extensions::Extension; |
+using extensions::ProcessManager; |
+#endif |
+ |
ContextMenuContentTypePlatformApp::ContextMenuContentTypePlatformApp( |
content::WebContents* web_contents, |
const content::ContextMenuParams& params) |
@@ -18,6 +25,15 @@ ContextMenuContentTypePlatformApp::ContextMenuContentTypePlatformApp( |
ContextMenuContentTypePlatformApp::~ContextMenuContentTypePlatformApp() { |
} |
+#if defined(ENABLE_EXTENSIONS) |
+const Extension* ContextMenuContentTypePlatformApp::GetExtension() const { |
+ ProcessManager* process_manager = |
+ ProcessManager::Get(source_web_contents()->GetBrowserContext()); |
+ return process_manager->GetExtensionForWebContents( |
+ source_web_contents()); |
+} |
+#endif |
+ |
bool ContextMenuContentTypePlatformApp::SupportsGroup(int group) { |
const extensions::Extension* platform_app = GetExtension(); |