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

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

Issue 2547703002: [Media Router] Handle multiple Presentation URLs when creating routes (Closed)
Patch Set: rebase Created 4 years 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 #include "url/gurl.h"
10
11 namespace media_router { 9 namespace media_router {
12 10
13 MediaSource::MediaSource(const MediaSource::Id& source_id) : id_(source_id) { 11 MediaSource::MediaSource(const MediaSource::Id& source_id) : id_(source_id) {
14 } 12 }
15 13
16 MediaSource::MediaSource(const GURL& presentation_url) 14 MediaSource::MediaSource(const GURL& presentation_url)
17 : id_(presentation_url.spec()) {} 15 : id_(presentation_url.spec()), url_(presentation_url) {}
18 16
19 MediaSource::~MediaSource() {} 17 MediaSource::~MediaSource() {}
20 18
21 MediaSource::Id MediaSource::id() const { 19 MediaSource::Id MediaSource::id() const {
22 return id_; 20 return id_;
23 } 21 }
24 22
23 GURL MediaSource::url() const {
24 return url_;
25 }
26
25 bool MediaSource::operator==(const MediaSource& other) const { 27 bool MediaSource::operator==(const MediaSource& other) const {
26 return id_ == other.id(); 28 return id_ == other.id();
27 } 29 }
28 30
29 std::string MediaSource::ToString() const { 31 std::string MediaSource::ToString() const {
30 return "MediaSource[" + id_ + "]"; 32 return "MediaSource[" + id_ + "]";
31 } 33 }
32 34
33 } // namespace media_router 35 } // namespace media_router
OLDNEW
« no previous file with comments | « chrome/browser/media/router/media_source.h ('k') | chrome/browser/media/router/media_source_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698