| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |