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

Side by Side Diff: chrome/browser/media/router/media_sink.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
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_SINK_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/media/router/media_route_id.h" 10 #include "chrome/browser/media/router/media_route_id.h"
11 11
12 namespace media_router { 12 namespace media_router {
13 13
14 using MediaSinkId = std::string; 14 using MediaSinkId = std::string;
15 15
16 // Represents a sink to which media can be routed. 16 // Represents a sink to which media can be routed.
17 class MediaSink { 17 class MediaSink {
18 public: 18 public:
19 // |sink_id|: Unique identifier for the MediaSink.
20 // |name|: Descriptive name of the MediaSink.
21 MediaSink(const MediaSinkId& sink_id, 19 MediaSink(const MediaSinkId& sink_id,
22 const std::string& name); 20 const std::string& name);
21
23 ~MediaSink(); 22 ~MediaSink();
24 23
25 const MediaSinkId& sink_id() const { return sink_id_; } 24 const MediaSinkId& id() const { return sink_id_; }
26 const std::string& name() const { return name_; } 25 const std::string& name() const { return name_; }
27 26
28 bool Equals(const MediaSink& other) const; 27 bool Equals(const MediaSink& other) const;
28 bool Empty() const;
29 29
30 private: 30 private:
31 const MediaSinkId sink_id_; 31 // Unique identifier for the MediaSink.
32 const std::string name_; 32 MediaSinkId sink_id_;
33 // Descriptive name of the MediaSink.
34 // Optional, can use an empty string if no sink name is available.
35 std::string name_;
33 }; 36 };
34 37
35 } // namespace media_router 38 } // namespace media_router
36 39
37 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ 40 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_
OLDNEW
« no previous file with comments | « chrome/browser/media/router/media_routes_observer.cc ('k') | chrome/browser/media/router/media_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698