| 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..c85bf668618b631ecad89013faeafaeaa4281b22
|
| --- /dev/null
|
| +++ b/chrome/browser/media/router/cast_media_sink.h
|
| @@ -0,0 +1,48 @@
|
| +// 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() override;
|
| +
|
| + 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:
|
| + // A bit vector representing the capabilities of the sink.
|
| + int capabilities_;
|
| +
|
| + std::string ip_address_;
|
| +
|
| + // ID of Cast channel opened for the sink.
|
| + int cast_channel_id_;
|
| +};
|
| +
|
| +} // namespace media_router
|
| +
|
| +#endif // CHROME_BROWSER_MEDIA_ROUTER_CAST_MEDIA_SINK_H_
|
|
|