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

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

Issue 2675033002: [Media Router] Add MediaSink subtypes (Closed)
Patch Set: resolve code review comments from Derek Created 3 years, 10 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 2017 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_CAST_MEDIA_SINK_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_CAST_MEDIA_SINK_H_
7
8 #include "chrome/browser/media/router/media_sink.h"
9
10 namespace media_router {
11
12 // Represents a cast sink to which media can be routed.
13 class CastMediaSink : public MediaSink {
14 public:
15 CastMediaSink(const MediaSink::Id& sink_id,
16 const std::string& name,
17 const IconType icon_type);
18 CastMediaSink(const CastMediaSink& other);
19 ~CastMediaSink() override;
20
21 int capabilities() const { return capabilities_; }
22 void set_capabilities(int capabilities) { capabilities_ = capabilities; }
23 const std::string& ip_address() const { return ip_address_; }
24 void set_ip_address(const std::string& ip_address) {
25 ip_address_ = ip_address;
26 }
27 int cast_channel_id() const { return cast_channel_id_; }
28 void set_cast_channel_id(int cast_channel_id) {
29 cast_channel_id_ = cast_channel_id;
30 }
31
32 // Used by mojo.
33 static const CastMediaSink* Cast(const MediaSink* sink);
34 static CastMediaSink* Cast(MediaSink* sink);
35
36 private:
37 // A bit vector representing the capabilities of the sink.
38 int capabilities_;
39
40 std::string ip_address_;
41
42 // ID of Cast channel opened for the sink.
43 int cast_channel_id_;
44 };
45
46 } // namespace media_router
47
48 #endif // CHROME_BROWSER_MEDIA_ROUTER_CAST_MEDIA_SINK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698