| Index: chrome/browser/media/router/presentation_request.cc
|
| diff --git a/chrome/browser/media/router/presentation_request.cc b/chrome/browser/media/router/presentation_request.cc
|
| index 396fdf0f353d40b2901e03689562dd747ffb81f2..58d2faacff679351ac0de73174c302700127242c 100644
|
| --- a/chrome/browser/media/router/presentation_request.cc
|
| +++ b/chrome/browser/media/router/presentation_request.cc
|
| @@ -10,11 +10,13 @@ namespace media_router {
|
|
|
| PresentationRequest::PresentationRequest(
|
| const RenderFrameHostId& render_frame_host_id,
|
| - const std::string& presentation_url,
|
| + const std::vector<std::string>& presentation_urls,
|
| const GURL& frame_url)
|
| : render_frame_host_id_(render_frame_host_id),
|
| - presentation_url_(presentation_url),
|
| - frame_url_(frame_url) {}
|
| + presentation_urls_(presentation_urls),
|
| + frame_url_(frame_url) {
|
| + DCHECK(!presentation_urls_.empty());
|
| +}
|
|
|
| PresentationRequest::PresentationRequest(const PresentationRequest& other) =
|
| default;
|
| @@ -23,12 +25,15 @@ PresentationRequest::~PresentationRequest() = default;
|
|
|
| bool PresentationRequest::Equals(const PresentationRequest& other) const {
|
| return render_frame_host_id_ == other.render_frame_host_id_ &&
|
| - presentation_url_ == other.presentation_url_ &&
|
| + presentation_urls_ == other.presentation_urls_ &&
|
| frame_url_ == other.frame_url_;
|
| }
|
|
|
| -MediaSource PresentationRequest::GetMediaSource() const {
|
| - return MediaSourceForPresentationUrl(presentation_url_);
|
| +std::vector<MediaSource> PresentationRequest::GetMediaSources() const {
|
| + std::vector<MediaSource> sources;
|
| + for (const std::string& presentation_url : presentation_urls_)
|
| + sources.push_back(MediaSourceForPresentationUrl(presentation_url));
|
| + return sources;
|
| }
|
|
|
| } // namespace media_router
|
|
|