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

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

Issue 1020743003: [Media Router] Design MediaRouter interface with stub implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move MRPMH::Delegate inheritence from MR to MRImpl Created 5 years, 9 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 <map>
Kevin M 2015/03/26 20:50:14 Not needed
imcheng 2015/03/26 23:33:13 Done.
9 #include <set>
10 #include <vector>
Kevin M 2015/03/26 20:50:15 Not needed
imcheng 2015/03/26 23:33:13 Done.
11
12 #include "chrome/browser/media/router/media_route.h"
Kevin M 2015/03/26 20:50:14 Not needed
imcheng 2015/03/26 23:33:13 Done.
13 #include "chrome/browser/media/router/media_sink.h"
14 #include "chrome/browser/media/router/media_source.h"
15
16 namespace media_router {
17
18 struct SinksQueryResult {
19 SinksQueryResult();
Kevin M 2015/03/26 20:50:14 No ctor/dtor
imcheng 2015/03/26 23:33:13 Needed by compiler.
20 ~SinksQueryResult();
21
22 std::vector<MediaSink> sinks;
23 };
24
25 // Interface for observing when the set of sinks compatible with a MediaSource
Kevin M 2015/03/26 20:50:15 "set" => list || collection
imcheng 2015/03/26 23:33:13 Changed to collection.
26 // has been updated.
Kevin M 2015/03/26 20:50:14 Can you add a comment about why this is just an in
imcheng 2015/03/26 23:33:13 Added more comments.
27 class MediaSinksObserver {
28 public:
29 // Constructs an observer that will observe for sinks compatible
30 // with |source|.
31 explicit MediaSinksObserver(const MediaSource& source) : source_(source) {}
32 virtual ~MediaSinksObserver() {}
33
34 // This function is invoked when the list of sinks compatible
35 // with |source_| has been updated.
36 virtual void OnSinksReceived(const SinksQueryResult& result) = 0;
37
38 const MediaSource& source() const { return source_; }
39
40 private:
41 MediaSource source_;
42 };
43
44 } // namespace media_router
45
46 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINKS_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698