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

Unified Diff: third_party/WebKit/public/platform/modules/presentation/presentation.mojom

Issue 2706463002: [Presentation API] Mojo typemap for content::PresentationConnectionMessage (Closed)
Patch Set: Fix compile error in presentation_connection_message Created 3 years, 10 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: third_party/WebKit/public/platform/modules/presentation/presentation.mojom
diff --git a/third_party/WebKit/public/platform/modules/presentation/presentation.mojom b/third_party/WebKit/public/platform/modules/presentation/presentation.mojom
index 7af914029cd35230df079b046eadfae4c6449d35..871285e41c2e67c66193270e7ea7b295f510a923 100644
--- a/third_party/WebKit/public/platform/modules/presentation/presentation.mojom
+++ b/third_party/WebKit/public/platform/modules/presentation/presentation.mojom
@@ -39,19 +39,9 @@ struct PresentationError {
string message;
};
-enum PresentationMessageType {
- TEXT,
- BINARY,
-};
-
-struct ConnectionMessage {
- PresentationMessageType type;
- // Used when message type is TEXT.
- string? message;
- // Used when message type is BINARY.
- // TODO(lethalantidote): Make this a mojo union.
- // See https://crbug.com/632623.
- array<uint8>? data;
+union PresentationConnectionMessage {
+ string message;
+ array<uint8> data;
};
interface PresentationConnection {
@@ -59,7 +49,7 @@ interface PresentationConnection {
// PresentationConnection.Send(). http://crbug.com/658474
// Called when a message is sent by the target connection.
- OnMessage(ConnectionMessage message) => (bool success);
+ OnMessage(PresentationConnectionMessage message) => (bool success);
// Called when target connection notifies connection state change.
DidChangeState(PresentationConnectionState state);
@@ -121,7 +111,7 @@ interface PresentationService {
// the send requests and invalidate all pending requests. This occurs
// for eg., when frame is deleted or navigated away.
SendConnectionMessage(PresentationSessionInfo sessionInfo,
- ConnectionMessage message_request) => (bool success);
+ PresentationConnectionMessage message) => (bool success);
// Called when close() is called by the frame.
CloseConnection(url.mojom.Url presentation_url, string presentation_id);
@@ -170,7 +160,7 @@ interface PresentationServiceClient {
// See PresentationService::ListenForConnectionMessages.
OnConnectionMessagesReceived(PresentationSessionInfo sessionInfo,
- array<ConnectionMessage> messages);
+ array<PresentationConnectionMessage> messages);
// Called on a presentation receiver when presentation connection is available
// from the controlling page.

Powered by Google App Engine
This is Rietveld 408576698