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

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

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.h
diff --git a/content/browser/presentation/presentation_service_impl.h b/content/browser/presentation/presentation_service_impl.h
index 5b4972d62db9046766f396224397e1662c7c8308..6d0917cfaca9a41eeb519903e6747673b85feed0 100644
--- a/content/browser/presentation/presentation_service_impl.h
+++ b/content/browser/presentation/presentation_service_impl.h
@@ -64,6 +64,7 @@ class CONTENT_EXPORT PresentationServiceImpl
using SessionStateCallback =
mojo::Callback<void(presentation::PresentationSessionInfoPtr,
presentation::PresentationSessionState)>;
+ using SendMessageMojoCallback = mojo::Callback<void()>;
// A helper data class used by PresentationServiceImpl to do bookkeeping
// of currently registered screen availability listeners.
@@ -166,6 +167,11 @@ class CONTENT_EXPORT PresentationServiceImpl
const mojo::String& presentation_url,
const mojo::String& presentation_id,
const NewSessionMojoCallback& callback) override;
+ void SendStringMessage(
+ const mojo::String& presentation_url,
+ const mojo::String& presentation_id,
+ const mojo::String& message,
+ const SendMessageMojoCallback& callback) override;
void CloseSession(
const mojo::String& presentation_url,
const mojo::String& presentation_id) override;
@@ -269,6 +275,9 @@ class CONTENT_EXPORT PresentationServiceImpl
// NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<PresentationServiceImpl> weak_factory_;
+ // There could be be one send message request at a time.
+ scoped_ptr<SendMessageMojoCallback> send_message_cb_ptr_;
+
DISALLOW_COPY_AND_ASSIGN(PresentationServiceImpl);
};

Powered by Google App Engine
This is Rietveld 408576698