Index: chrome/browser/ui/toolbar/component_toolbar_actions_factory.h |
diff --git a/chrome/browser/ui/toolbar/component_toolbar_actions_factory.h b/chrome/browser/ui/toolbar/component_toolbar_actions_factory.h |
index 7768b7db6eff8c9730aeab98e1df927f0264d65a..6b2d58bb69178021c6e81f5ce0cbcd1b8ea57362 100644 |
--- a/chrome/browser/ui/toolbar/component_toolbar_actions_factory.h |
+++ b/chrome/browser/ui/toolbar/component_toolbar_actions_factory.h |
@@ -13,15 +13,22 @@ |
#include "chrome/browser/ui/toolbar/toolbar_actions_bar.h" |
class Browser; |
+class ExtensionService; |
class Profile; |
class ToolbarActionViewController; |
+namespace extensions { |
+class ExtensionRegistry; |
+} |
+ |
// The registry for all component toolbar actions. Component toolbar actions |
// are actions that live in the toolbar (like extension actions), but are |
// components of chrome, such as ChromeCast. |
class ComponentToolbarActionsFactory { |
public: |
- // Component action IDs. |
+ // Extension and component action IDs. |
+ static const char kCastBetaExtensionId[]; |
+ static const char kCastExtensionId[]; |
static const char kMediaRouterActionId[]; |
ComponentToolbarActionsFactory(); |
@@ -39,11 +46,21 @@ class ComponentToolbarActionsFactory { |
Browser* browser, |
ToolbarActionsBar* bar); |
+ // Unloads extensions that were migrated to component actions and therefore |
+ // are no longer needed. |
+ void UnloadMigratedExtensions(ExtensionService* service, |
+ extensions::ExtensionRegistry* registry); |
+ |
// Sets the factory to use for testing purposes. |
// Ownership remains with the caller. |
static void SetTestingFactory(ComponentToolbarActionsFactory* factory); |
private: |
+ // Unloads an extension if it is active. |
+ void UnloadExtension(ExtensionService* service, |
+ extensions::ExtensionRegistry* registry, |
+ const std::string& extension_id); |
+ |
DISALLOW_COPY_AND_ASSIGN(ComponentToolbarActionsFactory); |
}; |