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

Unified Diff: chrome/browser/extensions/extension_action_manager.cc

Issue 12042096: Move page action manifest parsing out of Extension; the first multi-key manifest handler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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/extension_action_manager.cc
diff --git a/chrome/browser/extensions/extension_action_manager.cc b/chrome/browser/extensions/extension_action_manager.cc
index 468cf7491d01da8acabab8499f06680b01e8dd8f..c60383e1599780a8c63eb8bfd9b1fc8e204cfaf5 100644
--- a/chrome/browser/extensions/extension_action_manager.cc
+++ b/chrome/browser/extensions/extension_action_manager.cc
@@ -13,6 +13,8 @@
#include "chrome/browser/profiles/profile_keyed_service_factory.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/api/extension_action/action_info.h"
+#include "chrome/common/extensions/api/extension_action/page_action_handler.h"
+#include "chrome/common/extensions/api/extension_action/script_badge_handler.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/feature_switch.h"
#include "content/public/browser/notification_service.h"
@@ -124,7 +126,7 @@ ExtensionAction* ExtensionActionManager::GetPageAction(
return NULL;
return GetOrCreateOrNull(&page_actions_, extension.id(),
ActionInfo::TYPE_PAGE,
- extension.page_action_info());
+ ActionInfo::GetPageActionInfo(&extension));
}
ExtensionAction* ExtensionActionManager::GetBrowserAction(
@@ -132,10 +134,10 @@ ExtensionAction* ExtensionActionManager::GetBrowserAction(
const ActionInfo* action_info = ActionInfo::GetBrowserActionInfo(&extension);
ActionInfo::Type action_type = ActionInfo::TYPE_BROWSER;
if (FeatureSwitch::script_badges()->IsEnabled() &&
- extension.page_action_info()) {
+ ActionInfo::GetPageActionInfo(&extension)) {
// The action box changes the meaning of the page action area, so we
// need to convert page actions into browser actions.
- action_info = extension.page_action_info();
+ action_info = ActionInfo::GetPageActionInfo(&extension);
action_type = ActionInfo::TYPE_PAGE;
}
return GetOrCreateOrNull(&browser_actions_, extension.id(),

Powered by Google App Engine
This is Rietveld 408576698