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

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

Issue 1076973002: [Media Router] Reland: MediaRouter interfaces with stub implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINKS_OBSERVER_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINKS_OBSERVER_H_
7
8 #include <vector>
9
10 #include "base/macros.h"
11 #include "chrome/browser/media/router/media_sink.h"
12 #include "chrome/browser/media/router/media_source.h"
13
14 namespace media_router {
15
16 class MediaRouter;
17
18 // Base class for observing when the collection of sinks compatible with
19 // a MediaSource has been updated.
20 // A MediaSinksObserver implementation can be registered to MediaRouter to
21 // receive results. It can then interpret / process the results accordingly.
22 class MediaSinksObserver {
23 public:
24 // Constructs an observer that will observe for sinks compatible
25 // with |source|.
26 MediaSinksObserver(MediaRouter* router, const MediaSource& source);
27 virtual ~MediaSinksObserver();
28
29 // This function is invoked when the list of sinks compatible
30 // with |source_| has been updated.
31 virtual void OnSinksReceived(const std::vector<MediaSink>& sinks) {}
32
33 const MediaSource& source() const { return source_; }
34
35 private:
36 const MediaSource source_;
37 MediaRouter* router_;
38
39 DISALLOW_COPY_AND_ASSIGN(MediaSinksObserver);
40 };
41
42 } // namespace media_router
43
44 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINKS_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/media/router/media_sink_unittest.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