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

Unified Diff: content/common/presentation/presentation_service.mojom

Issue 1037483003: [PresentationAPI] Implementing send() from WebPresentationClient to the PresentationService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated callback handling, message invalidation and and sending generic message struct. 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/common/presentation/presentation_service.mojom
diff --git a/content/common/presentation/presentation_service.mojom b/content/common/presentation/presentation_service.mojom
index 36756e23a080698ec63f93627b099bba23d9750e..42d2862f4de770122673c5a35374dea063eebdc2 100644
--- a/content/common/presentation/presentation_service.mojom
+++ b/content/common/presentation/presentation_service.mojom
@@ -26,6 +26,19 @@ struct PresentationError {
string message;
};
+enum PresentationMessageType {
+ TEXT,
+ ARRAY_BUFFER,
+};
+
+struct MessageRequest {
haibinlu 2015/04/24 22:13:25 can this be renamed to SessionMessage so that on-m
USE s.singapati at gmail.com 2015/04/27 19:28:56 Yes, planning to rename this. SessionMessage would
+ string presentation_url;
+ string presentation_id;
+ PresentationMessageType type;
+ string message;
+ array<uint8> data;
+};
+
interface PresentationService {
// Called when the frame sets or changes the default presentation URL or
// presentation ID.
@@ -74,6 +87,10 @@ interface PresentationService {
JoinSession(string presentation_url, string? presentation_id)
=> (PresentationSessionInfo? sessionInfo, PresentationError? error);
+ // Called when send() is called by the frame. The result callback is
+ // to get notified that message has been received and ready for next one.
+ SendMessage(MessageRequest message_request) => ();
+
// Called when closeSession() is called by the frame.
CloseSession(string presentation_url, string presentation_id);

Powered by Google App Engine
This is Rietveld 408576698