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

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

Issue 459493002: Revert of Extend contextMenus API to support browser/page actions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/context_menus/context_menus_api_helpers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bcd3a4bb2a5b4edc4269a1834afdff4dff5391e2..773bd6249014a07855af73cdd2f518564e0e2e9c 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
@@ -38,7 +38,6 @@
} // namespace
-extern const char kActionNotAllowedError[];
extern const char kCannotFindItemError[];
extern const char kCheckedError[];
extern const char kDuplicateIDError[];
@@ -89,14 +88,6 @@
case PropertyWithEnumT::CONTEXTS_TYPE_LAUNCHER:
// Not available for <webview>.
contexts.Add(extensions::MenuItem::LAUNCHER);
- break;
- case PropertyWithEnumT::CONTEXTS_TYPE_BROWSER_ACTION:
- // Not available for <webview>.
- contexts.Add(extensions::MenuItem::BROWSER_ACTION);
- break;
- case PropertyWithEnumT::CONTEXTS_TYPE_PAGE_ACTION:
- // Not available for <webview>.
- contexts.Add(extensions::MenuItem::PAGE_ACTION);
break;
case PropertyWithEnumT::CONTEXTS_TYPE_NONE:
NOTREACHED();
@@ -160,15 +151,6 @@
}
}
- if (contexts.Contains(MenuItem::BROWSER_ACTION) ||
- contexts.Contains(MenuItem::PAGE_ACTION)) {
- // Action items are not allowed for <webview>.
- if (!extension->is_extension() || is_webview) {
- *error = kActionNotAllowedError;
- return false;
- }
- }
-
// Title.
std::string title;
if (create_properties.title.get())
« no previous file with comments | « no previous file | chrome/browser/extensions/api/context_menus/context_menus_api_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698