Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(381)

Unified Diff: content/browser/presentation/presentation_service_impl.cc

Issue 1037483003: [PresentationAPI] Implementing send() from WebPresentationClient to the PresentationService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: callback handling for send requests, other fixes. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 9e2fd22e9c8c59971ce8f898b92864e220704a2e..0460f3fec59a2a549fc3ba2d86ecb8356dcb4a6f 100644
--- a/content/browser/presentation/presentation_service_impl.cc
+++ b/content/browser/presentation/presentation_service_impl.cc
@@ -300,6 +300,20 @@ void PresentationServiceImpl::SetDefaultPresentationURL(
DoSetDefaultPresentationUrl(new_default_url, default_presentation_id);
}
+void PresentationServiceImpl::SendStringMessage(
+ const mojo::String& presentation_url,
+ const mojo::String& presentation_id,
+ const mojo::String& message,
+ const SendMessageMojoCallback& callback) {
+ if (!delegate_) {
+ callback.Run();
+ return;
+ }
+ // TODO(s.singapati): Save the callback into send_message_cb_ptr_
+ // and run it after request completion by delegate_.
+ NOTIMPLEMENTED();
+}
+
void PresentationServiceImpl::CloseSession(
const mojo::String& presentation_url,
const mojo::String& presentation_id) {
@@ -373,6 +387,11 @@ void PresentationServiceImpl::Reset() {
InvokeNewSessionMojoCallbackWithError(*pending_entry.second);
}
pending_session_cbs_.clear();
+
+ if (send_message_cb_ptr_) {
+ send_message_cb_ptr_->Run();
whywhat 2015/04/13 13:31:21 This might result in the PresentationDispatcher se
USE s.singapati at gmail.com 2015/04/14 17:51:51 Done. callback is Reset for now. May be Mojo disco
+ send_message_cb_ptr_.reset();
+ }
}
void PresentationServiceImpl::InvokeNewSessionMojoCallbackWithError(

Powered by Google App Engine
This is Rietveld 408576698