diff options
author | yoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-31 02:19:07 +0000 |
---|---|---|
committer | yoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-31 02:19:07 +0000 |
commit | bc8d134739b6cdc5a7f6bb2ffe7ecd48b147fd0e (patch) | |
tree | f9997def30adec048e042bb7503ce5bc26caf36a /chrome/common/extensions/api/extension_action | |
parent | 9ad974318aed27d5187101f227592932d5b44da1 (diff) | |
download | chromium_src-bc8d134739b6cdc5a7f6bb2ffe7ecd48b147fd0e.zip chromium_src-bc8d134739b6cdc5a7f6bb2ffe7ecd48b147fd0e.tar.gz chromium_src-bc8d134739b6cdc5a7f6bb2ffe7ecd48b147fd0e.tar.bz2 |
Move multiple UI surfaces check to PageActionHandler.
(We don't need to check is_app because the features system doesn't provide browser/page actions to apps.)
BUG=159265
Review URL: https://chromiumcodereview.appspot.com/16092015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203312 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/api/extension_action')
-rw-r--r-- | chrome/common/extensions/api/extension_action/page_action_handler.cc | 6 |
1 files changed, 6 insertions, 0 deletions
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 136693b..b39fe78 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)) { + *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); |