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

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: Comments, naming, small changes Created 6 years, 5 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>.
gpdavis 2014/07/22 18:52:53 Should I add this comment in for the browser and p
Yoyo Zhou 2014/07/23 23:37:21 Yes, these are also not available for webview.
gpdavis 2014/07/23 23:57:58 Done.
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;
case PropertyWithEnumT::CONTEXTS_TYPE_NONE:
NOTREACHED();
}
« no previous file with comments | « no previous file | chrome/browser/extensions/context_menu_matcher.h » ('j') | chrome/common/extensions/api/context_menus.json » ('J')

Powered by Google App Engine
This is Rietveld 408576698