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

Unified Diff: chrome/browser/ui/toolbar/media_router_action_controller.h

Issue 2678083005: Remove extension-to-component migration mechanism (Closed)
Patch Set: Address Derek's comments Created 3 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/ui/toolbar/media_router_action_controller.h
diff --git a/chrome/browser/ui/toolbar/media_router_action_controller.h b/chrome/browser/ui/toolbar/media_router_action_controller.h
index 9a19f77c3e8984f2958473e13cf251952dd29632..9bd10f3f77c36df58a8db153b28be76cd0a12e53 100644
--- a/chrome/browser/ui/toolbar/media_router_action_controller.h
+++ b/chrome/browser/ui/toolbar/media_router_action_controller.h
@@ -7,13 +7,12 @@
#include <vector>
-#include "chrome/browser/extensions/component_migration_helper.h"
#include "chrome/browser/media/router/issues_observer.h"
#include "chrome/browser/media/router/media_routes_observer.h"
#include "chrome/browser/profiles/profile.h"
#include "components/prefs/pref_change_registrar.h"
-using extensions::ComponentMigrationHelper;
+class ComponentActionDelegate;
// Controller for MediaRouterAction that determines when to show and hide the
// action icon on the toolbar. There should be one instance of this class per
@@ -26,14 +25,17 @@ class MediaRouterActionController : public media_router::IssuesObserver,
MediaRouterActionController(
Profile* profile,
media_router::MediaRouter* router,
- ComponentMigrationHelper::ComponentActionDelegate*
- component_action_delegate,
- ComponentMigrationHelper* component_migration_helper);
+ ComponentActionDelegate* component_action_delegate);
~MediaRouterActionController() override;
// Whether the media router action is shown by an administrator policy.
static bool IsActionShownByPolicy(Profile* profile);
+ // Gets and sets the preference for whether the media router action should be
+ // pinned to the toolbar/overflow menu.
+ static bool GetAlwaysShowActionPref(Profile* profile);
+ static void SetAlwaysShowActionPref(Profile* profile, bool always_show);
+
// media_router::IssuesObserver:
void OnIssue(const media_router::Issue& issue) override;
void OnIssuesCleared() override;
@@ -70,12 +72,7 @@ class MediaRouterActionController : public media_router::IssuesObserver,
// The delegate that is responsible for showing and hiding the icon on the
// toolbar. It outlives |this|.
- ComponentMigrationHelper::ComponentActionDelegate* const
- component_action_delegate_;
-
- // Responsible for changing the pref to always show or hide component actions.
- // It is owned by ToolbarActionsModel and outlives |this|.
- ComponentMigrationHelper* const component_migration_helper_;
+ ComponentActionDelegate* const component_action_delegate_;
bool has_issue_ = false;
bool has_local_display_route_ = false;

Powered by Google App Engine
This is Rietveld 408576698