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

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

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 #include "chrome/browser/media/router/cast_media_sink.h"
6
7 #include "base/logging.h"
8
9 namespace media_router {
10
11 CastMediaSink::CastMediaSink(const MediaSink::Id& sink_id,
12 const std::string& name,
13 const MediaSink::IconType icon_type)
14 : MediaSink(sink_id, name, icon_type),
15 capabilities_(0),
16 cast_channel_id_(0) {
17 type_ = SinkType::CAST;
imcheng 2017/02/08 01:28:08 Can the type be passed into the base constructor?
zhaobin 2017/02/09 00:13:52 Done.
18 }
19
20 CastMediaSink::CastMediaSink(const CastMediaSink& other) = default;
21
22 CastMediaSink::~CastMediaSink() = default;
23
24 // static
25 const CastMediaSink* CastMediaSink::Cast(const MediaSink* sink) {
26 DCHECK(sink->type() == MediaSink::SinkType::CAST);
27 return static_cast<const CastMediaSink*>(sink);
28 }
29
30 // static
31 CastMediaSink* CastMediaSink::Cast(MediaSink* sink) {
32 DCHECK(sink->type() == MediaSink::SinkType::CAST);
33 return static_cast<CastMediaSink*>(sink);
34 }
35
36 } // namespace media_router
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698