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

Unified Diff: chrome/browser/media/router/presentation_request.cc

Issue 2264153002: [Presentation API] Add support for multiple URLs in PresentationRequest on Media Router UI side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Create CastModesWithMediaSources Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
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..62aa3cb883bf73e4d4be6fce8bd31e5467c26300 100644
--- a/chrome/browser/media/router/presentation_request.cc
+++ b/chrome/browser/media/router/presentation_request.cc
@@ -13,7 +13,7 @@ PresentationRequest::PresentationRequest(
const std::string& presentation_url,
const GURL& frame_url)
: render_frame_host_id_(render_frame_host_id),
- presentation_url_(presentation_url),
+ presentation_urls_({presentation_url}),
frame_url_(frame_url) {}
PresentationRequest::PresentationRequest(const PresentationRequest& other) =
@@ -23,12 +23,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

Powered by Google App Engine
This is Rietveld 408576698