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

Side by Side Diff: chrome/browser/media/router/media_sinks_observer.h

Issue 1143603004: [Media Router] Add Media Router Mojo impl code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Xiaohan's comments Created 5 years, 6 months 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_MEDIA_ROUTER_MEDIA_SINKS_OBSERVER_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINKS_OBSERVER_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINKS_OBSERVER_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINKS_OBSERVER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 10 matching lines...) Expand all
21 // receive results. It can then interpret / process the results accordingly. 21 // receive results. It can then interpret / process the results accordingly.
22 class MediaSinksObserver { 22 class MediaSinksObserver {
23 public: 23 public:
24 // Constructs an observer that will observe for sinks compatible 24 // Constructs an observer that will observe for sinks compatible
25 // with |source|. 25 // with |source|.
26 MediaSinksObserver(MediaRouter* router, const MediaSource& source); 26 MediaSinksObserver(MediaRouter* router, const MediaSource& source);
27 virtual ~MediaSinksObserver(); 27 virtual ~MediaSinksObserver();
28 28
29 // This function is invoked when the list of sinks compatible 29 // This function is invoked when the list of sinks compatible
30 // with |source_| has been updated. 30 // with |source_| has been updated.
31 // Implementations may not perform operations that modify the Media Router's
32 // observer list. In particular, invoking this observer's destructor within
33 // OnSinksReceived will result in undefined behavior.
31 virtual void OnSinksReceived(const std::vector<MediaSink>& sinks) {} 34 virtual void OnSinksReceived(const std::vector<MediaSink>& sinks) {}
32 35
33 const MediaSource& source() const { return source_; } 36 const MediaSource& source() const { return source_; }
34 37
35 private: 38 private:
36 const MediaSource source_; 39 const MediaSource source_;
37 MediaRouter* router_; 40 MediaRouter* router_;
38 41
39 DISALLOW_COPY_AND_ASSIGN(MediaSinksObserver); 42 DISALLOW_COPY_AND_ASSIGN(MediaSinksObserver);
40 }; 43 };
41 44
42 } // namespace media_router 45 } // namespace media_router
43 46
44 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINKS_OBSERVER_H_ 47 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINKS_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/media/router/media_routes_observer.cc ('k') | chrome/browser/media/router/media_sinks_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698