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

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

Issue 2386633003: [Media Router] Convert MediaRouter to use GURL for presentation URLs. (Closed)
Patch Set: Respond to dcheng@ comment Created 4 years, 2 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/presentation_request.h" 5 #include "chrome/browser/media/router/presentation_request.h"
6 6
7 #include "chrome/browser/media/router/media_source_helper.h" 7 #include "chrome/browser/media/router/media_source_helper.h"
8 8
9 namespace media_router { 9 namespace media_router {
10 10
11 PresentationRequest::PresentationRequest( 11 PresentationRequest::PresentationRequest(
12 const RenderFrameHostId& render_frame_host_id, 12 const RenderFrameHostId& render_frame_host_id,
13 const std::vector<std::string>& presentation_urls, 13 const std::vector<GURL>& presentation_urls,
14 const GURL& frame_url) 14 const GURL& frame_url)
15 : render_frame_host_id_(render_frame_host_id), 15 : render_frame_host_id_(render_frame_host_id),
16 presentation_urls_(presentation_urls), 16 presentation_urls_(presentation_urls),
17 frame_url_(frame_url) { 17 frame_url_(frame_url) {
18 DCHECK(!presentation_urls_.empty()); 18 DCHECK(!presentation_urls_.empty());
19 } 19 }
20 20
21 PresentationRequest::PresentationRequest(const PresentationRequest& other) = 21 PresentationRequest::PresentationRequest(const PresentationRequest& other) =
22 default; 22 default;
23 23
24 PresentationRequest::~PresentationRequest() = default; 24 PresentationRequest::~PresentationRequest() = default;
25 25
26 bool PresentationRequest::Equals(const PresentationRequest& other) const { 26 bool PresentationRequest::Equals(const PresentationRequest& other) const {
27 return render_frame_host_id_ == other.render_frame_host_id_ && 27 return render_frame_host_id_ == other.render_frame_host_id_ &&
28 presentation_urls_ == other.presentation_urls_ && 28 presentation_urls_ == other.presentation_urls_ &&
29 frame_url_ == other.frame_url_; 29 frame_url_ == other.frame_url_;
30 } 30 }
31 31
32 std::vector<MediaSource> PresentationRequest::GetMediaSources() const { 32 std::vector<MediaSource> PresentationRequest::GetMediaSources() const {
33 std::vector<MediaSource> sources; 33 std::vector<MediaSource> sources;
34 for (const auto& presentation_url : presentation_urls_) 34 for (const auto& presentation_url : presentation_urls_)
35 sources.push_back(MediaSourceForPresentationUrl(presentation_url)); 35 sources.push_back(MediaSourceForPresentationUrl(presentation_url));
36 return sources; 36 return sources;
37 } 37 }
38 38
39 } // namespace media_router 39 } // namespace media_router
OLDNEW
« no previous file with comments | « chrome/browser/media/router/presentation_request.h ('k') | chrome/browser/media/router/presentation_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698