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

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: 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.h
diff --git a/chrome/browser/media/router/presentation_request.h b/chrome/browser/media/router/presentation_request.h
index f280e0c6a7bef6e6184c3985f57a380f78210746..c687ac6f8b42e7f5f54b675154956799b90cdd4f 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,6 +19,7 @@ namespace media_router {
class PresentationRequest {
public:
PresentationRequest(const RenderFrameHostId& render_frame_host_id,
+ // TODO(crbug.com/627655): Handle multiple URLs.
mark a. foltz 2016/08/31 05:18:54 Would it be possible to change the ctor to take co
takumif 2016/09/01 21:09:25 Done.
const std::string& presentation_url,
const GURL& frame_url);
PresentationRequest(const PresentationRequest& other);
@@ -25,21 +27,22 @@ class 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