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

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: No (c) in new files Copyright message. Created 5 years, 7 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
« no previous file with comments | « no previous file | content/browser/presentation/presentation_service_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3be72cfe949ad59269743f10aadaf264ea086509 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 SendSessionMessage(
+ 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(
@@ -328,6 +333,9 @@ class CONTENT_EXPORT PresentationServiceImpl
// The binding is removed when binding_ is cleared or goes out of scope.
scoped_ptr<mojo::Binding<presentation::PresentationService>> binding_;
+ // There can be only one send message request at a time.
+ scoped_ptr<SendMessageMojoCallback> send_message_callback_;
+
scoped_ptr<SessionMessagesCallback> on_session_messages_callback_;
// ID of the RenderFrameHost this object is associated with.
« no previous file with comments | « no previous file | content/browser/presentation/presentation_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698