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

Side by Side Diff: chrome/browser/media/router/dial_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/dial_media_sink.h"
6
7 #include "base/logging.h"
8
9 namespace media_router {
10
11 DialMediaSink::DialMediaSink(const MediaSink::Id& sink_id,
12 const std::string& name,
13 const MediaSink::IconType icon_type)
14 : MediaSink(sink_id, name, icon_type) {
15 type_ = SinkType::DIAL;
16 }
17
18 DialMediaSink::DialMediaSink(const DialMediaSink& other) = default;
19
20 DialMediaSink::~DialMediaSink() = default;
21
22 // static
23 const DialMediaSink* DialMediaSink::Cast(const MediaSink* sink) {
24 DCHECK(sink->type() == MediaSink::SinkType::DIAL);
25 return static_cast<const DialMediaSink*>(sink);
26 }
27
28 // static
29 DialMediaSink* DialMediaSink::Cast(MediaSink* sink) {
30 DCHECK(sink->type() == MediaSink::SinkType::DIAL);
31 return static_cast<DialMediaSink*>(sink);
32 }
33
34 } // namespace media_router
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698