Chromium Code Reviews| 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); |