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

Unified Diff: chrome/browser/extensions/api/context_menus/context_menus_api_helpers.h

Issue 359493005: Extend contextMenus API to support browser/page actions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added context strings, page action implementation Created 6 years, 6 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/extensions/api/context_menus/context_menus_api_helpers.h
diff --git a/chrome/browser/extensions/api/context_menus/context_menus_api_helpers.h b/chrome/browser/extensions/api/context_menus/context_menus_api_helpers.h
index 773bd6249014a07855af73cdd2f518564e0e2e9c..8115ba2a51137b7776c700abb4bbc04bfe9b97b7 100644
--- a/chrome/browser/extensions/api/context_menus/context_menus_api_helpers.h
+++ b/chrome/browser/extensions/api/context_menus/context_menus_api_helpers.h
@@ -89,6 +89,12 @@ MenuItem::ContextList GetContexts(const PropertyWithEnumT& property) {
// Not available for <webview>.
contexts.Add(extensions::MenuItem::LAUNCHER);
break;
+ case PropertyWithEnumT::CONTEXTS_TYPE_BROWSER_ACTION:
+ contexts.Add(extensions::MenuItem::BROWSER_ACTION);
+ break;
+ case PropertyWithEnumT::CONTEXTS_TYPE_PAGE_ACTION:
+ contexts.Add(extensions::MenuItem::PAGE_ACTION);
+ break;
gpdavis 2014/06/28 00:05:41 This is the reason I added the browser_action and
case PropertyWithEnumT::CONTEXTS_TYPE_NONE:
NOTREACHED();
}

Powered by Google App Engine
This is Rietveld 408576698