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

Unified Diff: chrome/common/extensions/api/extension_action/page_action_handler.cc

Issue 16092015: Move multiple UI surfaces check to PageActionHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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/common/extensions/extension.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/extension_action/page_action_handler.cc
diff --git a/chrome/common/extensions/api/extension_action/page_action_handler.cc b/chrome/common/extensions/api/extension_action/page_action_handler.cc
index 136693b444f5f2527660dc8c879a6c950ba211a2..b39fe78d33bdb9fa89a3d0be99ea7d8929c9a30e 100644
--- a/chrome/common/extensions/api/extension_action/page_action_handler.cc
+++ b/chrome/common/extensions/api/extension_action/page_action_handler.cc
@@ -56,6 +56,12 @@ bool PageActionHandler::Parse(Extension* extension, string16* error) {
}
}
+ // An extension cannot have both browser and page actions.
+ if (extension->manifest()->HasKey(keys::kBrowserAction)) {
Matt Perry 2013/05/30 23:16:14 The asymmetry of this bothers me (as in, why not p
Yoyo Zhou 2013/05/30 23:24:11 It's kind of a hack. A better or worse hack would
+ *error = ASCIIToUTF16(errors::kOneUISurfaceOnly);
+ return false;
+ }
+
// If page_action_value is not NULL, then there was a valid page action.
if (page_action_value) {
page_action_info = ActionInfo::Load(extension, page_action_value, error);
« no previous file with comments | « no previous file | chrome/common/extensions/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698