Chromium Code Reviews| Index: chrome/browser/media/router/cast_media_sink.h |
| diff --git a/chrome/browser/media/router/cast_media_sink.h b/chrome/browser/media/router/cast_media_sink.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d4fc556d1043dd05fa62fd571176b78b64c22f45 |
| --- /dev/null |
| +++ b/chrome/browser/media/router/cast_media_sink.h |
| @@ -0,0 +1,49 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_MEDIA_ROUTER_CAST_MEDIA_SINK_H_ |
| +#define CHROME_BROWSER_MEDIA_ROUTER_CAST_MEDIA_SINK_H_ |
| + |
| +#include "chrome/browser/media/router/media_sink.h" |
| + |
| +namespace media_router { |
| + |
| +// Represents a cast sink to which media can be routed. |
| +class CastMediaSink : public MediaSink { |
| + public: |
| + CastMediaSink(const MediaSink::Id& sink_id, |
| + const std::string& name, |
| + const IconType icon_type); |
| + CastMediaSink(const CastMediaSink& other); |
| + ~CastMediaSink(); |
| + |
| + int capabilities() const { return capabilities_; } |
| + void set_capabilities(int capabilities) { capabilities_ = capabilities; } |
| + const std::string& ip_address() const { return ip_address_; } |
| + void set_ip_address(const std::string& ip_address) { |
| + ip_address_ = ip_address; |
| + } |
| + int cast_channel_id() const { return cast_channel_id_; } |
| + void set_cast_channel_id(int cast_channel_id) { |
| + cast_channel_id_ = cast_channel_id; |
| + } |
| + |
| + // Used by mojo. |
| + static const CastMediaSink* Cast(const MediaSink* sink); |
| + static CastMediaSink* Cast(MediaSink* sink); |
| + |
| + private: |
| + 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.
|
| + |
| + // 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.
|
| + std::string ip_address_; |
| + |
| + // 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.
|
| + // used to send call chrome.cast.channel.send. |
| + int cast_channel_id_; |
| +}; |
| + |
| +} // namespace media_router |
| + |
| +#endif // CHROME_BROWSER_MEDIA_ROUTER_CAST_MEDIA_SINK_H_ |