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 388543a7d465ce637b4abf6bb8d91eed965ed5d4..635fe96f274397e81cc2fdb73162b5ebf90e9dae 100644 |
--- a/content/browser/presentation/presentation_service_impl.h |
+++ b/content/browser/presentation/presentation_service_impl.h |
@@ -67,6 +67,7 @@ class CONTENT_EXPORT PresentationServiceImpl |
presentation::PresentationSessionState)>; |
using SessionMessagesCallback = |
mojo::Callback<void(mojo::Array<presentation::SessionMessagePtr>)>; |
+ using SendMessageMojoCallback = mojo::Callback<void(bool)>; |
// A helper data class used by PresentationServiceImpl to do bookkeeping |
// of currently registered screen availability listeners. |
@@ -207,6 +208,9 @@ class CONTENT_EXPORT PresentationServiceImpl |
const mojo::String& presentation_url, |
const mojo::String& presentation_id, |
const NewSessionMojoCallback& callback) override; |
+ void SendMessage( |
+ presentation::SessionMessagePtr session_message, |
+ const SendMessageMojoCallback& callback) override; |
void CloseSession( |
const mojo::String& presentation_url, |
const mojo::String& presentation_id) override; |
@@ -252,7 +256,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( |
@@ -263,6 +267,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( |
@@ -337,6 +342,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. |
mark a. foltz
2015/05/07 01:34:30
Did you mean to say,
There can be only one send m
USE s.singapati at gmail.com
2015/05/07 14:08:51
Done.
|
+ scoped_ptr<SendMessageMojoCallback> send_message_cb_ptr_; |
mark a. foltz
2015/05/07 01:34:30
Can you put this before |on_session_messages_callb
haibinlu
2015/05/07 02:28:20
send_message_callback_ to be consistent?
USE s.singapati at gmail.com
2015/05/07 14:08:52
Done.
USE s.singapati at gmail.com
2015/05/07 14:08:52
Done.
|
+ |
DISALLOW_COPY_AND_ASSIGN(PresentationServiceImpl); |
}; |