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

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

Issue 1020743003: [Media Router] Design MediaRouter interface with stub implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed mark's comments Created 5 years, 8 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/media/router/media_source.h" 5 #include "chrome/browser/media/router/media_source.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 namespace media_router { 9 namespace media_router {
10 10
11 MediaSource::MediaSource(const std::string& source_id) 11 MediaSource::MediaSource(const MediaSourceId& source_id) : id_(source_id) {}
12 : id_(source_id) { 12
13 } 13 MediaSource::MediaSource() {}
14 14
15 MediaSource::~MediaSource() {} 15 MediaSource::~MediaSource() {}
16 16
17 std::string MediaSource::id() const { 17 MediaSourceId MediaSource::id() const {
18 return id_; 18 return id_;
19 } 19 }
20 20
21 bool MediaSource::Equals(const MediaSource& other) const {
22 return id_ == other.id();
23 }
24
25 bool MediaSource::Empty() const {
26 return id_.empty();
27 }
28
29 std::ostream& operator<<(std::ostream& output, const MediaSource& source) {
30 output << "MediaSource[" << source.id() << "]";
31 return output;
32 }
33
21 } // namespace media_router 34 } // namespace media_router
OLDNEW
« chrome/browser/media/router/media_source.h ('K') | « chrome/browser/media/router/media_source.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698