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..acc21df2b155236c40cccc3923f46bc476652e42 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; |
@@ -207,7 +213,7 @@ class CONTENT_EXPORT PresentationServiceImpl |
// and informs the PresentationServiceDelegate of such. |
void Reset(); |
- // These two functions are bound as base::Callbacks and passed to |
+ // These functions are bound as base::Callbacks and passed to |
// embedder's implementation of PresentationServiceDelegate for later |
// invocation. |
void OnStartOrJoinSessionSucceeded( |
@@ -218,6 +224,7 @@ class CONTENT_EXPORT PresentationServiceImpl |
bool is_start_session, |
int request_session_id, |
const PresentationError& error); |
+ void OnSendMessageCallback(); |
// Requests delegate to start a session. |
void DoStartSession( |
@@ -269,6 +276,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); |
}; |