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_CREATE_PRESENTATION_CONNECTION_REQUEST_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_CREATE_PRESENTATION_CONNECTION_REQUEST_H_ |
6 #define CHROME_BROWSER_MEDIA_ROUTER_CREATE_PRESENTATION_CONNECTION_REQUEST_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_CREATE_PRESENTATION_CONNECTION_REQUEST_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 14 matching lines...) Expand all Loading... | |
25 } // namespace url | 25 } // namespace url |
26 | 26 |
27 namespace media_router { | 27 namespace media_router { |
28 | 28 |
29 class RouteRequestResult; | 29 class RouteRequestResult; |
30 | 30 |
31 // Holds parameters for creating a presentation. A request object is created by | 31 // Holds parameters for creating a presentation. A request object is created by |
32 // presentation_service_delegate_impl, which is then passed to and owned by the | 32 // presentation_service_delegate_impl, which is then passed to and owned by the |
33 // MediaRouterUI. |success_cb| will be invoked when create-session succeeds, or | 33 // MediaRouterUI. |success_cb| will be invoked when create-session succeeds, or |
34 // |error_cb| will be invoked when create-session fails or the UI closes. | 34 // |error_cb| will be invoked when create-session fails or the UI closes. |
35 // TODO(mfoltz): Combine this with PresentationRequest as it's largely | |
36 // redundant. | |
35 class CreatePresentationConnectionRequest { | 37 class CreatePresentationConnectionRequest { |
36 public: | 38 public: |
37 using PresentationConnectionCallback = | 39 using PresentationConnectionCallback = |
38 base::Callback<void(const content::PresentationInfo&, const MediaRoute&)>; | 40 base::Callback<void(const content::PresentationInfo&, const MediaRoute&)>; |
39 using PresentationConnectionErrorCallback = | 41 using PresentationConnectionErrorCallback = |
40 content::PresentationConnectionErrorCallback; | 42 content::PresentationConnectionErrorCallback; |
41 // |presentation_url|: The presentation URL of the request. Must be a valid | 43 // |presentation_url|: The presentation URL of the request. Must be a valid |
42 // URL. | 44 // URL. |
43 // |frame_origin|: The origin of the frame that initiated the presentation | 45 // |frame_origin|: The origin of the frame that initiated the presentation |
44 // request. | 46 // request. |
47 // |is_top_level_frame|: True if the request is from a top level frame. | |
takumif
2017/05/16 21:51:28
No longer necessary?
mark a. foltz
2017/05/16 22:02:11
Removed.
| |
45 // |success_cb|: Callback to invoke when the request succeeds. Must be valid. | 48 // |success_cb|: Callback to invoke when the request succeeds. Must be valid. |
46 // |erorr_cb|: Callback to invoke when the request fails. Must be valid. | 49 // |error_cb|: Callback to invoke when the request fails. Must be valid. |
47 CreatePresentationConnectionRequest( | 50 CreatePresentationConnectionRequest( |
48 const RenderFrameHostId& render_frame_host_id, | 51 const RenderFrameHostId& render_frame_host_id, |
49 const std::vector<GURL>& presentation_urls, | 52 const std::vector<GURL>& presentation_urls, |
50 const url::Origin& frame_origin, | 53 const url::Origin& frame_origin, |
51 const PresentationConnectionCallback& success_cb, | 54 const PresentationConnectionCallback& success_cb, |
52 const PresentationConnectionErrorCallback& error_cb); | 55 const PresentationConnectionErrorCallback& error_cb); |
53 ~CreatePresentationConnectionRequest(); | 56 ~CreatePresentationConnectionRequest(); |
54 | 57 |
55 const PresentationRequest& presentation_request() const { | 58 const PresentationRequest& presentation_request() const { |
56 return presentation_request_; | 59 return presentation_request_; |
(...skipping 17 matching lines...) Expand all Loading... | |
74 PresentationConnectionCallback success_cb_; | 77 PresentationConnectionCallback success_cb_; |
75 PresentationConnectionErrorCallback error_cb_; | 78 PresentationConnectionErrorCallback error_cb_; |
76 bool cb_invoked_; | 79 bool cb_invoked_; |
77 | 80 |
78 DISALLOW_COPY_AND_ASSIGN(CreatePresentationConnectionRequest); | 81 DISALLOW_COPY_AND_ASSIGN(CreatePresentationConnectionRequest); |
79 }; | 82 }; |
80 | 83 |
81 } // namespace media_router | 84 } // namespace media_router |
82 | 85 |
83 #endif // CHROME_BROWSER_MEDIA_ROUTER_CREATE_PRESENTATION_CONNECTION_REQUEST_H_ | 86 #endif // CHROME_BROWSER_MEDIA_ROUTER_CREATE_PRESENTATION_CONNECTION_REQUEST_H_ |
OLD | NEW |