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

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

Issue 2675033002: [Media Router] Add MediaSink subtypes (Closed)
Patch Set: add url.mojom to media_router.mojoms JsResources 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();
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 int capabilities_;
imcheng 2017/02/08 01:28:08 Please add a comment: // A bit vector representin
zhaobin 2017/02/09 00:13:52 Done.
38
39 // Used for feedback
imcheng 2017/02/08 01:28:08 We probably don't need this comment.
zhaobin 2017/02/09 00:13:52 Done.
40 std::string ip_address_;
41
42 // ID of cast channel opened by Media Router. The ID can be
imcheng 2017/02/08 01:28:08 // ID of Cast channel opened for the sink.
zhaobin 2017/02/09 00:13:52 Done.
43 // used to send call chrome.cast.channel.send.
44 int cast_channel_id_;
45 };
46
47 } // namespace media_router
48
49 #endif // CHROME_BROWSER_MEDIA_ROUTER_CAST_MEDIA_SINK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698