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

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

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: Address Mark's comments Created 4 years, 3 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.h
diff --git a/chrome/browser/media/router/presentation_request.h b/chrome/browser/media/router/presentation_request.h
index f280e0c6a7bef6e6184c3985f57a380f78210746..a8580285a38bcbd200c323f13226668aedf8fbb4 100644
--- a/chrome/browser/media/router/presentation_request.h
+++ b/chrome/browser/media/router/presentation_request.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_REQUEST_H_
#include <string>
+#include <vector>
#include "chrome/browser/media/router/media_source.h"
#include "chrome/browser/media/router/render_frame_host_id.h"
@@ -18,28 +19,29 @@ namespace media_router {
class PresentationRequest {
public:
PresentationRequest(const RenderFrameHostId& render_frame_host_id,
- const std::string& presentation_url,
+ const std::vector<std::string>& presentation_urls,
const GURL& frame_url);
PresentationRequest(const PresentationRequest& other);
~PresentationRequest();
bool Equals(const PresentationRequest& other) const;
- // Helper method to get the MediaSource for |presentation_url_|.
- MediaSource GetMediaSource() const;
+ // Helper method to get the MediaSources for |presentation_urls_|.
+ std::vector<MediaSource> GetMediaSources() const;
const RenderFrameHostId& render_frame_host_id() const {
return render_frame_host_id_;
}
- const std::string& presentation_url() const { return presentation_url_; }
+ // TODO(crbug.com/627655): Use multiple URLs.
+ const std::string& presentation_url() const { return presentation_urls_[0]; }
const GURL& frame_url() const { return frame_url_; }
private:
// ID of RenderFrameHost that initiated the request.
const RenderFrameHostId render_frame_host_id_;
- // URL of presentation.
- const std::string presentation_url_;
+ // URLs of presentation.
+ const std::vector<std::string> presentation_urls_;
// URL of frame from which the request was initiated.
const GURL frame_url_;

Powered by Google App Engine
This is Rietveld 408576698