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

Side by Side Diff: chrome/browser/media/router/presentation_request.h

Issue 2547703002: [Media Router] Handle multiple Presentation URLs when creating routes (Closed)
Patch Set: rebase Created 4 years 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 #include <vector>
10 10
(...skipping 14 matching lines...) Expand all
25 ~PresentationRequest(); 25 ~PresentationRequest();
26 26
27 bool Equals(const PresentationRequest& other) const; 27 bool Equals(const PresentationRequest& other) const;
28 28
29 // Helper method to get the MediaSources for |presentation_urls_|. 29 // Helper method to get the MediaSources for |presentation_urls_|.
30 std::vector<MediaSource> GetMediaSources() const; 30 std::vector<MediaSource> GetMediaSources() const;
31 31
32 const RenderFrameHostId& render_frame_host_id() const { 32 const RenderFrameHostId& render_frame_host_id() const {
33 return render_frame_host_id_; 33 return render_frame_host_id_;
34 } 34 }
35 // TODO(crbug.com/627655): Use multiple URLs. 35 const std::vector<GURL>& presentation_urls() const {
36 const GURL& presentation_url() const { return presentation_urls_[0]; } 36 return presentation_urls_;
37 }
37 const GURL& frame_url() const { return frame_url_; } 38 const GURL& frame_url() const { return frame_url_; }
38 39
39 private: 40 private:
40 // ID of RenderFrameHost that initiated the request. 41 // ID of RenderFrameHost that initiated the request.
41 const RenderFrameHostId render_frame_host_id_; 42 const RenderFrameHostId render_frame_host_id_;
42 43
43 // URLs of presentation. 44 // URLs of presentation.
44 const std::vector<GURL> presentation_urls_; 45 const std::vector<GURL> presentation_urls_;
45 46
46 // URL of frame from which the request was initiated. 47 // URL of frame from which the request was initiated.
47 // TODO(crbug.com/632623): Convert this to url::Origin as only the origin or 48 // TODO(crbug.com/632623): Convert this to url::Origin as only the origin or
48 // hostname is used. 49 // hostname is used.
49 const GURL frame_url_; 50 const GURL frame_url_;
50 }; 51 };
51 52
52 } // namespace media_router 53 } // namespace media_router
53 54
54 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_REQUEST_H_ 55 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_REQUEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/media/router/media_source_unittest.cc ('k') | chrome/browser/media/router/presentation_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698