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

Side by Side Diff: content/common/presentation/presentation_service.mojom

Issue 1466573002: Presentation API: implement renderer side of PresentationConnection.close(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module presentation; 5 module presentation;
6 6
7 struct PresentationSessionInfo { 7 struct PresentationSessionInfo {
8 string url; 8 string url;
9 string id; 9 string id;
10 }; 10 };
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 => (PresentationSessionInfo? sessionInfo, PresentationError? error); 80 => (PresentationSessionInfo? sessionInfo, PresentationError? error);
81 81
82 // Called when send() is called by the frame. The true in the 82 // Called when send() is called by the frame. The true in the
83 // result callback notifies that the service is ready for next message. 83 // result callback notifies that the service is ready for next message.
84 // The false in the result callback notifies the renderer to stop sending 84 // The false in the result callback notifies the renderer to stop sending
85 // the send requests and invalidate all pending requests. This occurs 85 // the send requests and invalidate all pending requests. This occurs
86 // for eg., when frame is deleted or navigated away. 86 // for eg., when frame is deleted or navigated away.
87 SendSessionMessage(PresentationSessionInfo sessionInfo, 87 SendSessionMessage(PresentationSessionInfo sessionInfo,
88 SessionMessage message_request) => (bool success); 88 SessionMessage message_request) => (bool success);
89 89
90 // Called when closeSession() is called by the frame. 90 // Called when close() is called by the frame.
91 CloseSession(string presentation_url, string presentation_id); 91 CloseSession(string presentation_url, string presentation_id);
92 92
93 // Called when terminate() is called by the frame.
94 TerminateSession(string presentation_url, string presentation_id);
95
93 // Starts listening for messages for session with |sessionInfo|. 96 // Starts listening for messages for session with |sessionInfo|.
94 // Messages will be received in 97 // Messages will be received in
95 // PresentationServiceClient::OnSessionMessagesReceived. 98 // PresentationServiceClient::OnSessionMessagesReceived.
96 // This is called after a presentation session is created. 99 // This is called after a presentation session is created.
97 ListenForSessionMessages(PresentationSessionInfo sessionInfo); 100 ListenForSessionMessages(PresentationSessionInfo sessionInfo);
98 }; 101 };
99 102
100 interface PresentationServiceClient { 103 interface PresentationServiceClient {
101 // Called when the client tries to listen for screen availability changes for 104 // Called when the client tries to listen for screen availability changes for
102 // presentation of |url| but it is not supported by the device or underlying 105 // presentation of |url| but it is not supported by the device or underlying
(...skipping 12 matching lines...) Expand all
115 OnConnectionStateChanged(PresentationSessionInfo connection, 118 OnConnectionStateChanged(PresentationSessionInfo connection,
116 PresentationConnectionState newState); 119 PresentationConnectionState newState);
117 120
118 // See PresentationService::ListenForSessionMessages. 121 // See PresentationService::ListenForSessionMessages.
119 OnSessionMessagesReceived(PresentationSessionInfo sessionInfo, 122 OnSessionMessagesReceived(PresentationSessionInfo sessionInfo,
120 array<SessionMessage> messages); 123 array<SessionMessage> messages);
121 124
122 // See PresentationService::SetDefaultPresentationURL. 125 // See PresentationService::SetDefaultPresentationURL.
123 OnDefaultSessionStarted(PresentationSessionInfo sessionInfo); 126 OnDefaultSessionStarted(PresentationSessionInfo sessionInfo);
124 }; 127 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698