Chromium Code Reviews| 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..c0e0ddbcf9ae5a4a67b7c2ce9e43c45ba594c789 100644 |
| --- a/chrome/browser/ui/toolbar/media_router_action_controller.h |
| +++ b/chrome/browser/ui/toolbar/media_router_action_controller.h |
| @@ -7,14 +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 "chrome/browser/ui/toolbar/component_action_delegate.h" |
| #include "components/prefs/pref_change_registrar.h" |
| -using extensions::ComponentMigrationHelper; |
| - |
| // 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 |
| // profile, and it should only be used on the UI thread. |
| @@ -26,14 +24,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); |
|
imcheng
2017/02/08 22:59:29
Can this be forward declared?
takumif
2017/02/09 00:05:56
Done.
|
| ~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 +71,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; |