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 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "chrome/browser/media/router/media_route.h" | 12 #include "chrome/browser/media/router/media_route.h" |
13 #include "chrome/browser/media/router/media_source.h" | 13 #include "chrome/browser/media/router/media_source.h" |
14 #include "chrome/browser/media/router/presentation_request.h" | 14 #include "chrome/browser/media/router/presentation_request.h" |
15 #include "chrome/browser/media/router/render_frame_host_id.h" | 15 #include "chrome/browser/media/router/render_frame_host_id.h" |
16 #include "content/public/browser/presentation_service_delegate.h" | 16 #include "content/public/browser/presentation_service_delegate.h" |
17 #include "url/gurl.h" | 17 |
| 18 class GURL; |
18 | 19 |
19 namespace content { | 20 namespace content { |
20 struct PresentationError; | 21 struct PresentationError; |
21 struct PresentationSessionInfo; | 22 struct PresentationSessionInfo; |
22 } // namespace content | 23 } // namespace content |
23 | 24 |
24 namespace media_router { | 25 namespace media_router { |
25 | 26 |
26 class RouteRequestResult; | 27 class RouteRequestResult; |
27 | 28 |
(...skipping 10 matching lines...) Expand all Loading... |
38 const MediaRoute::Id&)>; | 39 const MediaRoute::Id&)>; |
39 using PresentationSessionErrorCallback = | 40 using PresentationSessionErrorCallback = |
40 content::PresentationSessionErrorCallback; | 41 content::PresentationSessionErrorCallback; |
41 // |presentation_url|: The presentation URL of the request. Must be a valid | 42 // |presentation_url|: The presentation URL of the request. Must be a valid |
42 // URL. | 43 // URL. |
43 // |frame_url|: The URL of the frame that initiated the presentation request. | 44 // |frame_url|: The URL of the frame that initiated the presentation request. |
44 // |success_cb|: Callback to invoke when the request succeeds. Must be valid. | 45 // |success_cb|: Callback to invoke when the request succeeds. Must be valid. |
45 // |erorr_cb|: Callback to invoke when the request fails. Must be valid. | 46 // |erorr_cb|: Callback to invoke when the request fails. Must be valid. |
46 CreatePresentationConnectionRequest( | 47 CreatePresentationConnectionRequest( |
47 const RenderFrameHostId& render_frame_host_id, | 48 const RenderFrameHostId& render_frame_host_id, |
48 const std::string& presentation_url, | 49 const GURL& presentation_url, |
49 const GURL& frame_url, | 50 const GURL& frame_url, |
50 const PresentationSessionSuccessCallback& success_cb, | 51 const PresentationSessionSuccessCallback& success_cb, |
51 const PresentationSessionErrorCallback& error_cb); | 52 const PresentationSessionErrorCallback& error_cb); |
52 ~CreatePresentationConnectionRequest(); | 53 ~CreatePresentationConnectionRequest(); |
53 | 54 |
54 const PresentationRequest& presentation_request() const { | 55 const PresentationRequest& presentation_request() const { |
55 return presentation_request_; | 56 return presentation_request_; |
56 } | 57 } |
57 | 58 |
58 // Invokes |success_cb_| or |error_cb_| with the given arguments. | 59 // Invokes |success_cb_| or |error_cb_| with the given arguments. |
(...skipping 13 matching lines...) Expand all Loading... |
72 PresentationSessionSuccessCallback success_cb_; | 73 PresentationSessionSuccessCallback success_cb_; |
73 PresentationSessionErrorCallback error_cb_; | 74 PresentationSessionErrorCallback error_cb_; |
74 bool cb_invoked_; | 75 bool cb_invoked_; |
75 | 76 |
76 DISALLOW_COPY_AND_ASSIGN(CreatePresentationConnectionRequest); | 77 DISALLOW_COPY_AND_ASSIGN(CreatePresentationConnectionRequest); |
77 }; | 78 }; |
78 | 79 |
79 } // namespace media_router | 80 } // namespace media_router |
80 | 81 |
81 #endif // CHROME_BROWSER_MEDIA_ROUTER_CREATE_PRESENTATION_CONNECTION_REQUEST_H_ | 82 #endif // CHROME_BROWSER_MEDIA_ROUTER_CREATE_PRESENTATION_CONNECTION_REQUEST_H_ |
OLD | NEW |