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

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

Issue 2559323002: Add a policy to always show the Cast toolbar icon (Closed)
Patch Set: Created 4 years 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 d2bfda782ce451d7fe60a21c9abe0a6fba2e1abd..d1743a10bd2bab88f29ba7f7f5789b01b59130d4 100644
--- a/chrome/browser/ui/toolbar/media_router_action_controller.h
+++ b/chrome/browser/ui/toolbar/media_router_action_controller.h
@@ -12,6 +12,7 @@
#include "chrome/browser/media/router/media_routes_observer.h"
#include "chrome/browser/profiles/profile.h"
#include "components/prefs/pref_change_registrar.h"
+#include "components/user_prefs/user_prefs.h"
using extensions::ComponentMigrationHelper;
@@ -31,6 +32,9 @@ class MediaRouterActionController : public media_router::IssuesObserver,
ComponentMigrationHelper* component_migration_helper);
~MediaRouterActionController() override;
+ // Whether the media router action is shown by an administrator policy.
+ static bool IsActionShownByPolicy(content::BrowserContext* context);
imcheng 2016/12/15 19:57:38 might as well use Profile here? Then you can do pr
takumif 2016/12/15 22:04:14 Done.
+
// media_router::IssuesObserver:
void OnIssueUpdated(const media_router::Issue* issue) override;
@@ -76,6 +80,9 @@ class MediaRouterActionController : public media_router::IssuesObserver,
bool has_issue_ = false;
bool has_local_display_route_ = false;
+ // Whether the media router action is shown by an administrator policy.
+ bool shown_by_policy_;
+
// The number of dialogs that are currently open.
size_t dialog_count_ = 0;

Powered by Google App Engine
This is Rietveld 408576698