Chromium Code Reviews| Index: chrome/browser/media/router/create_presentation_session_request.h |
| diff --git a/chrome/browser/media/router/create_presentation_session_request.h b/chrome/browser/media/router/create_presentation_session_request.h |
| index 9cebcb9aabc8a8d0644db629eea410567e462026..1409e326b922d754008e60c4b92cc6056faa70eb 100644 |
| --- a/chrome/browser/media/router/create_presentation_session_request.h |
| +++ b/chrome/browser/media/router/create_presentation_session_request.h |
| @@ -9,6 +9,8 @@ |
| #include "chrome/browser/media/router/media_route.h" |
| #include "chrome/browser/media/router/media_source.h" |
| +#include "chrome/browser/media/router/presentation_request.h" |
| +#include "chrome/browser/media/router/render_frame_host_id.h" |
| #include "content/public/browser/presentation_service_delegate.h" |
| #include "url/gurl.h" |
| @@ -30,8 +32,6 @@ class CreatePresentationSessionRequest { |
| using PresentationSessionSuccessCallback = |
| base::Callback<void(const content::PresentationSessionInfo&, |
| const MediaRoute::Id&)>; |
| - using PresentationSessionErrorCallback = |
| - content::PresentationServiceDelegate::PresentationSessionErrorCallback; |
| // |presentation_url|: The presentation URL of the request. Must be a valid |
| // URL. |
| @@ -39,14 +39,16 @@ class CreatePresentationSessionRequest { |
| // |success_cb|: Callback to invoke when the request succeeds. Must be valid. |
| // |erorr_cb|: Callback to invoke when the request fails. Must be valid. |
|
mark a. foltz
2015/10/20 20:15:25
Nit: typo in error_cb
imcheng
2015/10/24 00:41:19
Done.
|
| CreatePresentationSessionRequest( |
| + const RenderFrameHostId& render_frame_host_id, |
| const std::string& presentation_url, |
| const GURL& frame_url, |
| const PresentationSessionSuccessCallback& success_cb, |
| - const PresentationSessionErrorCallback& error_cb); |
| + const content::PresentationSessionErrorCallback& error_cb); |
|
mark a. foltz
2015/10/20 20:15:25
It feels weird to have the success callback declar
imcheng
2015/10/24 00:41:19
I added a type alias.
|
| ~CreatePresentationSessionRequest(); |
| - const MediaSource& media_source() const { return media_source_; } |
| - const GURL& frame_url() const { return frame_url_; } |
| + const PresentationRequest& presentation_request() const { |
| + return presentation_request_; |
| + } |
| // Invokes |success_cb_| or |error_cb_| with the given arguments. |
| // These functions can only be invoked once per instance. It is an error |
| @@ -63,10 +65,9 @@ class CreatePresentationSessionRequest { |
| const std::string& error); |
| private: |
| - const MediaSource media_source_; |
| - const GURL frame_url_; |
| + const PresentationRequest presentation_request_; |
| PresentationSessionSuccessCallback success_cb_; |
| - PresentationSessionErrorCallback error_cb_; |
| + content::PresentationSessionErrorCallback error_cb_; |
| bool cb_invoked_; |
| DISALLOW_COPY_AND_ASSIGN(CreatePresentationSessionRequest); |