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

Side by Side Diff: third_party/WebKit/public/platform/modules/presentation/presentation.mojom

Issue 2471573005: [Presentation API] (5th) (1-UA) integrate controller and receiver side for 1-UA messaging (Closed)
Patch Set: split renderer related changes into 4th patch Created 4 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 // TODO(crbug.com/647290): Rename "Session" to "Connection" 5 // TODO(crbug.com/647290): Rename "Session" to "Connection"
6 6
7 module blink.mojom; 7 module blink.mojom;
8 8
9 import "url/mojo/url.mojom"; 9 import "url/mojo/url.mojom";
10 10
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 Terminate(url.mojom.Url presentation_url, string presentation_id); 131 Terminate(url.mojom.Url presentation_url, string presentation_id);
132 132
133 // Starts listening for messages for session with |sessionInfo|. 133 // Starts listening for messages for session with |sessionInfo|.
134 // Messages will be received in 134 // Messages will be received in
135 // PresentationServiceClient::OnSessionMessagesReceived. 135 // PresentationServiceClient::OnSessionMessagesReceived.
136 // This is called after a presentation session is created. 136 // This is called after a presentation session is created.
137 ListenForSessionMessages(PresentationSessionInfo sessionInfo); 137 ListenForSessionMessages(PresentationSessionInfo sessionInfo);
138 }; 138 };
139 139
140 interface PresentationServiceClient { 140 interface PresentationServiceClient {
141
142 ////////////Functions here are called only on the controlling page.///////////
143
141 // Called when the client tries to listen for screen availability changes for 144 // Called when the client tries to listen for screen availability changes for
142 // presentation of |url| but it is not supported by the device or underlying 145 // presentation of |url| but it is not supported by the device or underlying
143 // platform. This can also be called if the device is currently in a mode 146 // platform. This can also be called if the device is currently in a mode
144 // where it can't do screen discoveries (eg. low battery). 147 // where it can't do screen discoveries (eg. low battery).
145 OnScreenAvailabilityNotSupported(url.mojom.Url url); 148 OnScreenAvailabilityNotSupported(url.mojom.Url url);
146 149
147 // Called when the client is listening for screen availability for 150 // Called when the client is listening for screen availability for
148 // presentation of |url| and the state changes. When the client starts to 151 // presentation of |url| and the state changes. When the client starts to
149 // listen for screen availability, this method will always be called to give 152 // listen for screen availability, this method will always be called to give
150 // the current known state. It will then be called to notify of state updates. 153 // the current known state. It will then be called to notify of state updates.
151 OnScreenAvailabilityUpdated(url.mojom.Url url, bool available); 154 OnScreenAvailabilityUpdated(url.mojom.Url url, bool available);
152 155
156 // See PresentationService::SetDefaultPresentationURL.
157 OnDefaultSessionStarted(PresentationSessionInfo sessionInfo);
158
159 //////////////////////////////////////////////////////////////////////////////
160
153 // Called when the state of PresentationConnection |connection| started on 161 // Called when the state of PresentationConnection |connection| started on
154 // this frame has changed to |newState|. 162 // this frame has changed to |newState|.
155 OnConnectionStateChanged(PresentationSessionInfo connection, 163 OnConnectionStateChanged(PresentationSessionInfo connection,
156 PresentationConnectionState newState); 164 PresentationConnectionState newState);
157 165
158 // Caled when the state of |connection| started on this frame has changed to 166 // Caled when the state of |connection| started on this frame has changed to
159 // CLOSED. 167 // CLOSED.
160 OnConnectionClosed(PresentationSessionInfo connection, 168 OnConnectionClosed(PresentationSessionInfo connection,
161 PresentationConnectionCloseReason reason, 169 PresentationConnectionCloseReason reason,
162 string message); 170 string message);
163 171
164 // See PresentationService::ListenForSessionMessages. 172 // See PresentationService::ListenForSessionMessages.
165 OnSessionMessagesReceived(PresentationSessionInfo sessionInfo, 173 OnSessionMessagesReceived(PresentationSessionInfo sessionInfo,
166 array<SessionMessage> messages); 174 array<SessionMessage> messages);
167 175
168 // See PresentationService::SetDefaultPresentationURL. 176 // Called on a presentation receiver when the first presentation connection is
169 OnDefaultSessionStarted(PresentationSessionInfo sessionInfo); 177 // available from the controlling page.
170 178 OnReceiverConnectionAvailable(PresentationSessionInfo sessionInfo,
171 // See PresentationService::ListeningForReceiverPageRendered. 179 PresentationConnection connection);
172 OnReceiverConnectionAvailable(PresentationSessionInfo sessionInfo);
173 }; 180 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698