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

Unified Diff: chrome/browser/media/router/issues_observer.h

Issue 2176613003: [Media Router] Clean up issues related code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests 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
« no previous file with comments | « chrome/browser/media/router/issue_unittest.cc ('k') | chrome/browser/media/router/issues_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/router/issues_observer.h
diff --git a/chrome/browser/media/router/issues_observer.h b/chrome/browser/media/router/issues_observer.h
index 87534916be5f3ce5b684612c8bcd70dc7a1343f9..974ece7bff54743f8ae104f42495bcfd348c9b99 100644
--- a/chrome/browser/media/router/issues_observer.h
+++ b/chrome/browser/media/router/issues_observer.h
@@ -19,15 +19,22 @@ class IssuesObserver {
explicit IssuesObserver(MediaRouter* router);
virtual ~IssuesObserver();
- void RegisterObserver();
- void UnregisterObserver();
+ // Registers with Media Router to start observing for Issues. No-ops if Init()
+ // has already been called before.
+ void Init();
// Called when there is an updated Media Router Issue.
- // If |issue| is nullptr, then there is currently no issue.
- virtual void OnIssueUpdated(const Issue* issue) {}
+ // Note that |issue| is owned by the IssueManager that is calling the
+ // observers. Implementations that wish to retain the data must make a copy
+ // of |issue|.
+ virtual void OnIssue(const Issue& issue) {}
+
+ // Called when there are no more issues.
+ virtual void OnIssuesCleared() {}
private:
MediaRouter* router_;
+ bool initialized_;
DISALLOW_COPY_AND_ASSIGN(IssuesObserver);
};
« no previous file with comments | « chrome/browser/media/router/issue_unittest.cc ('k') | chrome/browser/media/router/issues_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698