Chromium Code Reviews| 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 ec0f087bcb93904d144e91c6bc7da79d8b9e011e..d5f6dcdc43facd8857fe331432cd22173323606e 100644 |
| --- a/third_party/WebKit/public/platform/modules/presentation/presentation.mojom |
| +++ b/third_party/WebKit/public/platform/modules/presentation/presentation.mojom |
| @@ -52,10 +52,24 @@ struct SessionMessage { |
| array<uint8>? data; |
| }; |
| +interface PresentationConnection { |
| + // TODO(zhaobin): migrate SendSessionMessage from PresentationService => |
| + // PresentationConnection.Send(). http://crbug.com/658474 |
| + |
| + // Called to set the PresentationConnection that is the destination for |
| + // messages sent and the source of messages received by this connection. |
| + SetTargetConnection(PresentationConnection connection); |
| + |
| + // Called when a message is sent by the target connection. |
| + OnMessage(SessionMessage message); |
| +}; |
| + |
| interface PresentationService { |
| // Sets the PresentationServiceClient. |
| SetClient(PresentationServiceClient client); |
| + ///////////// Functions here are for the controller part of the API. ///////// |
| + |
| // Called when the frame sets or changes the default presentation URLs. |
| // When the default presentation is started on this frame, |
| // PresentationServiceClient::OnDefaultSessionStarted will be invoked. |
| @@ -90,6 +104,14 @@ interface PresentationService { |
| JoinSession(array<url.mojom.Url> presentation_urls, string? presentation_id) |
| => (PresentationSessionInfo? sessionInfo, PresentationError? error); |
| + // Called in StartSession's callback function for offscreen presentation only. |
| + // It passes in controlling frame's PresentationConnection to |
| + // PresentationService. |
| + SetPresentationConnection(PresentationSessionInfo sessionInfo, |
| + PresentationConnection connection); |
|
dcheng
2017/01/06 11:54:22
As far as I can tell, the goal is a 1:1 relationsh
zhaobin
2017/01/10 01:39:17
Done.
mark a. foltz
2017/01/10 23:05:33
I agree it would be slightly better to have an API
dcheng
2017/01/11 09:22:18
I'm not familiar enough with how the presentation
|
| + |
| + ////////////////////////////////////////////////////////////////////////////// |
| + |
| // Called when send() is called by the frame. The true in the |
| // result callback notifies that the service is ready for next message. |
| // The false in the result callback notifies the renderer to stop sending |