| 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 vector<GURL>& presentation_urls() const { return presentation_urls_; } |
| 36 const GURL& presentation_url() const { return presentation_urls_[0]; } | |
| 37 const GURL& frame_url() const { return frame_url_; } | 36 const GURL& frame_url() const { return frame_url_; } |
| 38 | 37 |
| 39 private: | 38 private: |
| 40 // ID of RenderFrameHost that initiated the request. | 39 // ID of RenderFrameHost that initiated the request. |
| 41 const RenderFrameHostId render_frame_host_id_; | 40 const RenderFrameHostId render_frame_host_id_; |
| 42 | 41 |
| 43 // URLs of presentation. | 42 // URLs of presentation. |
| 44 const std::vector<GURL> presentation_urls_; | 43 const std::vector<GURL> presentation_urls_; |
| 45 | 44 |
| 46 // URL of frame from which the request was initiated. | 45 // URL of frame from which the request was initiated. |
| 47 // TODO(crbug.com/632623): Convert this to url::Origin as only the origin or | 46 // TODO(crbug.com/632623): Convert this to url::Origin as only the origin or |
| 48 // hostname is used. | 47 // hostname is used. |
| 49 const GURL frame_url_; | 48 const GURL frame_url_; |
| 50 }; | 49 }; |
| 51 | 50 |
| 52 } // namespace media_router | 51 } // namespace media_router |
| 53 | 52 |
| 54 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_REQUEST_H_ | 53 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_REQUEST_H_ |
| OLD | NEW |