| 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_MEDIA_ROUTER_ISSUES_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_ISSUES_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_MEDIA_ROUTER_ISSUES_OBSERVER_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_ISSUES_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" |
| 8 #include "chrome/browser/media/router/issue.h" | 9 #include "chrome/browser/media/router/issue.h" |
| 9 | 10 |
| 10 namespace media_router { | 11 namespace media_router { |
| 11 | 12 |
| 12 class MediaRouter; | 13 class MediaRouter; |
| 13 | 14 |
| 14 // Base class for observing Media Router Issue. There is at most one Issue | 15 // Base class for observing Media Router Issue. There is at most one Issue |
| 15 // at any given time. | 16 // at any given time. |
| 16 class IssuesObserver { | 17 class IssuesObserver { |
| 17 public: | 18 public: |
| 18 explicit IssuesObserver(MediaRouter* router); | 19 explicit IssuesObserver(MediaRouter* router); |
| 19 virtual ~IssuesObserver(); | 20 virtual ~IssuesObserver(); |
| 20 | 21 |
| 21 void RegisterObserver(); | 22 void RegisterObserver(); |
| 22 void UnregisterObserver(); | 23 void UnregisterObserver(); |
| 23 | 24 |
| 24 // Called when there is an updated Media Router Issue. | 25 // Called when there is an updated Media Router Issue. |
| 25 // If |issue| is nullptr, then there is currently no issue. | 26 // If |issue| is nullptr, then there is currently no issue. |
| 26 virtual void OnIssueUpdated(const Issue* issue) {} | 27 virtual void OnIssueUpdated(const Issue* issue) {} |
| 27 | 28 |
| 28 private: | 29 private: |
| 29 MediaRouter* router_; | 30 MediaRouter* router_; |
| 30 | 31 |
| 31 DISALLOW_COPY_AND_ASSIGN(IssuesObserver); | 32 DISALLOW_COPY_AND_ASSIGN(IssuesObserver); |
| 32 }; | 33 }; |
| 33 | 34 |
| 34 } // namespace media_router | 35 } // namespace media_router |
| 35 | 36 |
| 36 #endif // CHROME_BROWSER_MEDIA_ROUTER_ISSUES_OBSERVER_H_ | 37 #endif // CHROME_BROWSER_MEDIA_ROUTER_ISSUES_OBSERVER_H_ |
| OLD | NEW |