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

Side by Side 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: Modify MediaRouterDialogControllerAndroid, format 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 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 #ifndef CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_REQUEST_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_REQUEST_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_REQUEST_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_REQUEST_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector>
9 10
10 #include "chrome/browser/media/router/media_source.h" 11 #include "chrome/browser/media/router/media_source.h"
11 #include "chrome/browser/media/router/render_frame_host_id.h" 12 #include "chrome/browser/media/router/render_frame_host_id.h"
12 #include "url/gurl.h" 13 #include "url/gurl.h"
13 14
14 namespace media_router { 15 namespace media_router {
15 16
16 // Represents a presentation request made from a render frame. Contains the 17 // Represents a presentation request made from a render frame. Contains the
17 // presentation URL of the request, and information on the originating frame. 18 // presentation URL of the request, and information on the originating frame.
18 class PresentationRequest { 19 class PresentationRequest {
19 public: 20 public:
20 PresentationRequest(const RenderFrameHostId& render_frame_host_id, 21 PresentationRequest(const RenderFrameHostId& render_frame_host_id,
21 const std::string& presentation_url, 22 const std::vector<std::string>& presentation_urls,
22 const GURL& frame_url); 23 const GURL& frame_url);
23 PresentationRequest(const PresentationRequest& other); 24 PresentationRequest(const PresentationRequest& other);
24 ~PresentationRequest(); 25 ~PresentationRequest();
25 26
26 bool Equals(const PresentationRequest& other) const; 27 bool Equals(const PresentationRequest& other) const;
27 28
28 // Helper method to get the MediaSource for |presentation_url_|. 29 // Helper method to get the MediaSources for |presentation_urls_|.
29 MediaSource GetMediaSource() const; 30 std::vector<MediaSource> GetMediaSources() const;
30 31
31 const RenderFrameHostId& render_frame_host_id() const { 32 const RenderFrameHostId& render_frame_host_id() const {
32 return render_frame_host_id_; 33 return render_frame_host_id_;
33 } 34 }
34 const std::string& presentation_url() const { return presentation_url_; } 35 // TODO(crbug.com/627655): Use multiple URLs.
36 const std::string& presentation_url() const { return presentation_urls_[0]; }
35 const GURL& frame_url() const { return frame_url_; } 37 const GURL& frame_url() const { return frame_url_; }
36 38
37 private: 39 private:
38 // ID of RenderFrameHost that initiated the request. 40 // ID of RenderFrameHost that initiated the request.
39 const RenderFrameHostId render_frame_host_id_; 41 const RenderFrameHostId render_frame_host_id_;
40 42
41 // URL of presentation. 43 // URLs of presentation.
42 const std::string presentation_url_; 44 const std::vector<std::string> presentation_urls_;
43 45
44 // URL of frame from which the request was initiated. 46 // URL of frame from which the request was initiated.
45 const GURL frame_url_; 47 const GURL frame_url_;
46 }; 48 };
47 49
48 } // namespace media_router 50 } // namespace media_router
49 51
50 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_REQUEST_H_ 52 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_REQUEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/media/router/presentation_media_sinks_observer.cc ('k') | chrome/browser/media/router/presentation_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698