Index: content/browser/presentation/presentation_service_impl.cc |
diff --git a/content/browser/presentation/presentation_service_impl.cc b/content/browser/presentation/presentation_service_impl.cc |
index 23734a6b980b6ee79c5e9223f2507555b09abf57..17ec835b5f3017cb2bf09d6e292e9a2c3798a26b 100644 |
--- a/content/browser/presentation/presentation_service_impl.cc |
+++ b/content/browser/presentation/presentation_service_impl.cc |
@@ -112,8 +112,8 @@ std::unique_ptr<PresentationSessionMessage> GetPresentationSessionMessage( |
return output; |
} |
-void InvokeNewSessionMojoCallbackWithError( |
- const NewSessionMojoCallback& callback) { |
+void InvokeNewSessionCallbackWithError( |
+ const PresentationServiceImpl::NewSessionCallback& callback) { |
callback.Run(blink::mojom::PresentationSessionInfoPtr(), |
blink::mojom::PresentationError::From(PresentationError( |
PRESENTATION_ERROR_UNKNOWN, "Internal error"))); |
@@ -218,9 +218,8 @@ void PresentationServiceImpl::StopListeningForScreenAvailability( |
screen_availability_listeners_.erase(listener_it); |
} |
-void PresentationServiceImpl::StartSession( |
- const mojo::String& presentation_url, |
- const NewSessionMojoCallback& callback) { |
+void PresentationServiceImpl::StartSession(const mojo::String& presentation_url, |
+ const NewSessionCallback& callback) { |
DVLOG(2) << "StartSession"; |
if (!delegate_) { |
callback.Run( |
@@ -233,12 +232,12 @@ void PresentationServiceImpl::StartSession( |
// There is a StartSession request in progress. To avoid queueing up |
// requests, the incoming request is rejected. |
if (start_session_request_id_ != kInvalidRequestSessionId) { |
- InvokeNewSessionMojoCallbackWithError(callback); |
+ InvokeNewSessionCallbackWithError(callback); |
return; |
} |
start_session_request_id_ = GetNextRequestSessionId(); |
- pending_start_session_cb_.reset(new NewSessionMojoCallbackWrapper(callback)); |
+ pending_start_session_cb_.reset(new NewSessionCallbackWrapper(callback)); |
delegate_->StartSession( |
render_process_id_, render_frame_id_, presentation_url, |
base::Bind(&PresentationServiceImpl::OnStartSessionSucceeded, |
@@ -250,7 +249,7 @@ void PresentationServiceImpl::StartSession( |
void PresentationServiceImpl::JoinSession( |
const mojo::String& presentation_url, |
const mojo::String& presentation_id, |
- const NewSessionMojoCallback& callback) { |
+ const NewSessionCallback& callback) { |
DVLOG(2) << "JoinSession"; |
if (!delegate_) { |
callback.Run(blink::mojom::PresentationSessionInfoPtr(), |
@@ -262,7 +261,7 @@ void PresentationServiceImpl::JoinSession( |
int request_session_id = RegisterJoinSessionCallback(callback); |
if (request_session_id == kInvalidRequestSessionId) { |
- InvokeNewSessionMojoCallbackWithError(callback); |
+ InvokeNewSessionCallbackWithError(callback); |
return; |
} |
delegate_->JoinSession( |
@@ -277,13 +276,13 @@ void PresentationServiceImpl::JoinSession( |
} |
int PresentationServiceImpl::RegisterJoinSessionCallback( |
- const NewSessionMojoCallback& callback) { |
+ const NewSessionCallback& callback) { |
if (pending_join_session_cbs_.size() >= kMaxNumQueuedSessionRequests) |
return kInvalidRequestSessionId; |
int request_id = GetNextRequestSessionId(); |
pending_join_session_cbs_[request_id].reset( |
- new NewSessionMojoCallbackWrapper(callback)); |
+ new NewSessionCallbackWrapper(callback)); |
return request_id; |
} |
@@ -378,7 +377,7 @@ void PresentationServiceImpl::SetDefaultPresentationURL( |
void PresentationServiceImpl::SendSessionMessage( |
blink::mojom::PresentationSessionInfoPtr session, |
blink::mojom::SessionMessagePtr session_message, |
- const SendMessageMojoCallback& callback) { |
+ const SendSessionMessageCallback& callback) { |
DVLOG(2) << "SendSessionMessage"; |
DCHECK(!session_message.is_null()); |
// send_message_callback_ should be null by now, otherwise resetting of |
@@ -388,7 +387,7 @@ void PresentationServiceImpl::SendSessionMessage( |
return; |
} |
- send_message_callback_.reset(new SendMessageMojoCallback(callback)); |
+ send_message_callback_.reset(new SendSessionMessageCallback(callback)); |
delegate_->SendMessage( |
render_process_id_, render_frame_id_, |
session.To<PresentationSessionInfo>(), |
@@ -590,18 +589,18 @@ void PresentationServiceImpl::ScreenAvailabilityListenerImpl |
service_->client_->OnScreenAvailabilityNotSupported(availability_url_); |
} |
-PresentationServiceImpl::NewSessionMojoCallbackWrapper |
-::NewSessionMojoCallbackWrapper(const NewSessionMojoCallback& callback) |
+PresentationServiceImpl::NewSessionCallbackWrapper |
+::NewSessionCallbackWrapper(const NewSessionCallback& callback) |
: callback_(callback) { |
} |
-PresentationServiceImpl::NewSessionMojoCallbackWrapper |
-::~NewSessionMojoCallbackWrapper() { |
+PresentationServiceImpl::NewSessionCallbackWrapper |
+::~NewSessionCallbackWrapper() { |
if (!callback_.is_null()) |
- InvokeNewSessionMojoCallbackWithError(callback_); |
+ InvokeNewSessionCallbackWithError(callback_); |
} |
-void PresentationServiceImpl::NewSessionMojoCallbackWrapper::Run( |
+void PresentationServiceImpl::NewSessionCallbackWrapper::Run( |
blink::mojom::PresentationSessionInfoPtr session, |
blink::mojom::PresentationErrorPtr error) { |
DCHECK(!callback_.is_null()); |