| 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>();
|
|
|