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

Unified Diff: chrome/browser/extensions/api/extension_action/extension_action_api.cc

Issue 11644057: Move BrowserAction out of Extension (Closed) Base URL: http://git.chromium.org/chromium/src.git@dc_ungoop_extension_action
Patch Set: Latest master for CQ Created 7 years, 11 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/api/extension_action/extension_action_api.cc
diff --git a/chrome/browser/extensions/api/extension_action/extension_action_api.cc b/chrome/browser/extensions/api/extension_action/extension_action_api.cc
index f3cab931266d4dde64e08bdcadf9352009cec9fa..398dcb53ead1cd8fef506290dd3bceed9640daf4 100644
--- a/chrome/browser/extensions/api/extension_action/extension_action_api.cc
+++ b/chrome/browser/extensions/api/extension_action/extension_action_api.cc
@@ -24,6 +24,7 @@
#include "chrome/browser/profiles/profile.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/browser_action_handler.h"
#include "chrome/common/extensions/api/extension_action/script_badge_handler.h"
#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/manifest_handler.h"
@@ -186,10 +187,39 @@ static base::LazyInstance<ProfileKeyedAPIFactory<ExtensionActionAPI> >
g_factory = LAZY_INSTANCE_INITIALIZER;
ExtensionActionAPI::ExtensionActionAPI(Profile* profile) {
+ ManifestHandler::Register(extension_manifest_keys::kBrowserAction,
+ new BrowserActionHandler);
ManifestHandler::Register(extension_manifest_keys::kScriptBadge,
new ScriptBadgeHandler);
+
ExtensionFunctionRegistry* registry =
ExtensionFunctionRegistry::GetInstance();
+
+ // Browser Actions
+ registry->RegisterFunction<BrowserActionSetIconFunction>();
+ registry->RegisterFunction<BrowserActionSetTitleFunction>();
+ registry->RegisterFunction<BrowserActionSetBadgeTextFunction>();
+ registry->RegisterFunction<BrowserActionSetBadgeBackgroundColorFunction>();
+ registry->RegisterFunction<BrowserActionSetPopupFunction>();
+ registry->RegisterFunction<BrowserActionGetTitleFunction>();
+ registry->RegisterFunction<BrowserActionGetBadgeTextFunction>();
+ registry->RegisterFunction<BrowserActionGetBadgeBackgroundColorFunction>();
+ registry->RegisterFunction<BrowserActionGetPopupFunction>();
+ registry->RegisterFunction<BrowserActionEnableFunction>();
+ registry->RegisterFunction<BrowserActionDisableFunction>();
+
+ // Page Actions
+ registry->RegisterFunction<EnablePageActionsFunction>();
+ registry->RegisterFunction<DisablePageActionsFunction>();
+ registry->RegisterFunction<PageActionShowFunction>();
+ registry->RegisterFunction<PageActionHideFunction>();
+ registry->RegisterFunction<PageActionSetIconFunction>();
+ registry->RegisterFunction<PageActionSetTitleFunction>();
+ registry->RegisterFunction<PageActionSetPopupFunction>();
+ registry->RegisterFunction<PageActionGetTitleFunction>();
+ registry->RegisterFunction<PageActionGetPopupFunction>();
+
+ // Script Badges
registry->RegisterFunction<ScriptBadgeGetAttentionFunction>();
registry->RegisterFunction<ScriptBadgeGetPopupFunction>();
registry->RegisterFunction<ScriptBadgeSetPopupFunction>();
« no previous file with comments | « build/android/pylib/gtest/filter/unit_tests_disabled ('k') | chrome/browser/extensions/extension_action_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698