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 21de733b7b0cab9558f7b9feff54661c7d687961..3515fd4540ad0eb08fa82827d73af191dd384bb0 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(bool)>; |
// A helper data class used by PresentationServiceImpl to do bookkeeping |
// of currently registered screen availability listeners. |
@@ -202,6 +203,9 @@ class CONTENT_EXPORT PresentationServiceImpl |
const mojo::String& presentation_url, |
const mojo::String& presentation_id, |
const NewSessionMojoCallback& callback) override; |
+ void SendMessage( |
+ presentation::SessionMessagePtr message_request, |
+ const SendMessageMojoCallback& callback) override; |
void CloseSession( |
const mojo::String& presentation_url, |
const mojo::String& presentation_id) override; |
@@ -245,7 +249,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( |
@@ -256,6 +260,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( |
@@ -321,6 +326,9 @@ class CONTENT_EXPORT PresentationServiceImpl |
// NOTE: Weak pointers must be invalidated before all other member variables. |
base::WeakPtrFactory<PresentationServiceImpl> weak_factory_; |
+ // There could be one send message request at a time. |
+ scoped_ptr<SendMessageMojoCallback> send_message_cb_ptr_; |
+ |
DISALLOW_COPY_AND_ASSIGN(PresentationServiceImpl); |
}; |