Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_ACTION_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_ACTION_H_ |
| 6 #define CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_ACTION_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_ACTION_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/scoped_observer.h" | 9 #include "base/scoped_observer.h" |
| 10 #include "chrome/browser/media/router/issues_observer.h" | 10 #include "chrome/browser/media/router/issues_observer.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 91 // Checks if the current icon of MediaRouterAction has changed. If so, | 91 // Checks if the current icon of MediaRouterAction has changed. If so, |
| 92 // updates |current_icon_|. | 92 // updates |current_icon_|. |
| 93 void MaybeUpdateIcon(); | 93 void MaybeUpdateIcon(); |
| 94 | 94 |
| 95 gfx::VectorIconId GetCurrentIcon() const; | 95 gfx::VectorIconId GetCurrentIcon() const; |
| 96 | 96 |
| 97 // The current icon to show. This is updated based on the current issues and | 97 // The current icon to show. This is updated based on the current issues and |
| 98 // routes since |this| is an IssueObserver and MediaRoutesObserver. | 98 // routes since |this| is an IssueObserver and MediaRoutesObserver. |
| 99 gfx::VectorIconId current_icon_; | 99 gfx::VectorIconId current_icon_; |
| 100 | 100 |
| 101 // The current issue shown in the Media Router WebUI. Can be null. It is set | 101 // Whether the Media Router UI is currently showing an issue. If |true|, |
| 102 // in OnIssueUpdated(), which is called by the IssueManager. | 102 // |current_issue_severity_| indicates the severity of the issue. |
| 103 std::unique_ptr<media_router::Issue> issue_; | 103 // Set in OnIssueUpdated(), which is called by the IssueManager. |
| 104 bool has_issue_; | |
|
mark a. foltz
2016/07/27 18:52:04
It seems more straightforward for MediaRouterActio
imcheng
2016/09/13 20:27:54
I think the issue (no pun intended) here is that M
| |
| 105 | |
| 106 // The severity of the current issue shown in the Media Router WebUI. | |
| 107 // The value is valid only if |has_issue_| is true. | |
| 108 // Set in OnIssueUpdated(), which is called by the IssueManager. | |
| 109 media_router::Issue::Severity current_issue_severity_; | |
| 104 | 110 |
| 105 // Whether a local displayable active route exists. | 111 // Whether a local displayable active route exists. |
| 106 bool has_local_display_route_; | 112 bool has_local_display_route_; |
| 107 | 113 |
| 108 ToolbarActionViewDelegate* delegate_; | 114 ToolbarActionViewDelegate* delegate_; |
| 109 | 115 |
| 110 Browser* const browser_; | 116 Browser* const browser_; |
| 111 ToolbarActionsBar* const toolbar_actions_bar_; | 117 ToolbarActionsBar* const toolbar_actions_bar_; |
| 112 | 118 |
| 113 // The delegate to handle platform-specific implementations. | 119 // The delegate to handle platform-specific implementations. |
| 114 std::unique_ptr<MediaRouterActionPlatformDelegate> platform_delegate_; | 120 std::unique_ptr<MediaRouterActionPlatformDelegate> platform_delegate_; |
| 115 | 121 |
| 116 MediaRouterContextualMenu contextual_menu_; | 122 MediaRouterContextualMenu contextual_menu_; |
| 117 | 123 |
| 118 ScopedObserver<TabStripModel, TabStripModelObserver> | 124 ScopedObserver<TabStripModel, TabStripModelObserver> |
| 119 tab_strip_model_observer_; | 125 tab_strip_model_observer_; |
| 120 | 126 |
| 121 base::WeakPtrFactory<MediaRouterAction> weak_ptr_factory_; | 127 base::WeakPtrFactory<MediaRouterAction> weak_ptr_factory_; |
| 122 | 128 |
| 123 DISALLOW_COPY_AND_ASSIGN(MediaRouterAction); | 129 DISALLOW_COPY_AND_ASSIGN(MediaRouterAction); |
| 124 }; | 130 }; |
| 125 | 131 |
| 126 #endif // CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_ACTION_H_ | 132 #endif // CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_ACTION_H_ |
| OLD | NEW |