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

Side by Side Diff: chrome/browser/ui/toolbar/media_router_contextual_menu.h

Issue 2451573003: [Media Router] Update Media Router flags post-launch. (Closed)
Patch Set: Rebase & respond to apacible@ comments. Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_CONTEXTUAL_MENU_H_ 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_CONTEXTUAL_MENU_H_
6 #define CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_CONTEXTUAL_MENU_H_ 6 #define CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_CONTEXTUAL_MENU_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "ui/base/models/simple_menu_model.h" 10 #include "ui/base/models/simple_menu_model.h"
11 11
12 class Browser; 12 class Browser;
13 class ToolbarActionsModel; 13 class ToolbarActionsModel;
14 14
15 namespace extensions { 15 namespace extensions {
16 class ComponentMigrationHelper; 16 class ComponentMigrationHelper;
17 } // namespace extensions 17 } // namespace extensions
18 18
19 // The class for the contextual menu for the Media Router action. 19 // The class for the contextual menu for the Media Router action.
20 class MediaRouterContextualMenu : public ui::SimpleMenuModel::Delegate { 20 class MediaRouterContextualMenu : public ui::SimpleMenuModel::Delegate {
21 public: 21 public:
22 explicit MediaRouterContextualMenu(Browser* browser); 22 explicit MediaRouterContextualMenu(Browser* browser);
23 ~MediaRouterContextualMenu() override; 23 ~MediaRouterContextualMenu() override;
24 24
25 ui::MenuModel* menu_model() { return &menu_model_; } 25 ui::MenuModel* menu_model() { return &menu_model_; }
26 26
27 private: 27 private:
28 #if defined(GOOGLE_CHROME_BUILD)
29 FRIEND_TEST_ALL_PREFIXES(MediaRouterContextualMenuUnitTest, 28 FRIEND_TEST_ALL_PREFIXES(MediaRouterContextualMenuUnitTest,
30 ToggleCloudServicesItem); 29 ToggleCloudServicesItem);
31 #endif // GOOGLE_CHROME_BUILD
32 FRIEND_TEST_ALL_PREFIXES(MediaRouterContextualMenuUnitTest, 30 FRIEND_TEST_ALL_PREFIXES(MediaRouterContextualMenuUnitTest,
33 ToggleAlwaysShowIconItem); 31 ToggleAlwaysShowIconItem);
34 32
35 // Gets or sets the "Always show icon" option. 33 // Gets or sets the "Always show icon" option.
36 bool GetAlwaysShowActionPref() const; 34 bool GetAlwaysShowActionPref() const;
37 void SetAlwaysShowActionPref(bool always_show); 35 void SetAlwaysShowActionPref(bool always_show);
38 36
39 // ui::SimpleMenuModel::Delegate: 37 // ui::SimpleMenuModel::Delegate:
40 bool IsCommandIdChecked(int command_id) const override; 38 bool IsCommandIdChecked(int command_id) const override;
41 bool IsCommandIdEnabled(int command_id) const override; 39 bool IsCommandIdEnabled(int command_id) const override;
42 bool IsCommandIdVisible(int command_id) const override; 40 bool IsCommandIdVisible(int command_id) const override;
43 void ExecuteCommand(int command_id, int event_flags) override; 41 void ExecuteCommand(int command_id, int event_flags) override;
44 42
45 void ReportIssue(); 43 void ReportIssue();
46 44
47 Browser* const browser_; 45 Browser* const browser_;
48 ui::SimpleMenuModel menu_model_; 46 ui::SimpleMenuModel menu_model_;
49 extensions::ComponentMigrationHelper* const component_migration_helper_; 47 extensions::ComponentMigrationHelper* const component_migration_helper_;
50 48
51 DISALLOW_COPY_AND_ASSIGN(MediaRouterContextualMenu); 49 DISALLOW_COPY_AND_ASSIGN(MediaRouterContextualMenu);
52 }; 50 };
53 51
54 #endif // CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_CONTEXTUAL_MENU_H_ 52 #endif // CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_CONTEXTUAL_MENU_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698