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

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: call OPM.unregisterOPMController() in PresentationFrame::Reset() Created 4 years, 1 month 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
« no previous file with comments | « content/renderer/presentation/presentation_dispatcher.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 Terminate(url.mojom.Url presentation_url, string presentation_id); 127 Terminate(url.mojom.Url presentation_url, string presentation_id);
128 128
129 // Starts listening for messages for session with |sessionInfo|. 129 // Starts listening for messages for session with |sessionInfo|.
130 // Messages will be received in 130 // Messages will be received in
131 // PresentationServiceClient::OnSessionMessagesReceived. 131 // PresentationServiceClient::OnSessionMessagesReceived.
132 // This is called after a presentation session is created. 132 // This is called after a presentation session is created.
133 ListenForSessionMessages(PresentationSessionInfo sessionInfo); 133 ListenForSessionMessages(PresentationSessionInfo sessionInfo);
134 }; 134 };
135 135
136 interface PresentationServiceClient { 136 interface PresentationServiceClient {
137
138 ////////////Functions here are called only on the controlling page.///////////
139
137 // Called when the client tries to listen for screen availability changes for 140 // Called when the client tries to listen for screen availability changes for
138 // presentation of |url| but it is not supported by the device or underlying 141 // presentation of |url| but it is not supported by the device or underlying
139 // platform. This can also be called if the device is currently in a mode 142 // platform. This can also be called if the device is currently in a mode
140 // where it can't do screen discoveries (eg. low battery). 143 // where it can't do screen discoveries (eg. low battery).
141 OnScreenAvailabilityNotSupported(url.mojom.Url url); 144 OnScreenAvailabilityNotSupported(url.mojom.Url url);
142 145
143 // Called when the client is listening for screen availability for 146 // Called when the client is listening for screen availability for
144 // presentation of |url| and the state changes. When the client starts to 147 // presentation of |url| and the state changes. When the client starts to
145 // listen for screen availability, this method will always be called to give 148 // listen for screen availability, this method will always be called to give
146 // the current known state. It will then be called to notify of state updates. 149 // the current known state. It will then be called to notify of state updates.
147 OnScreenAvailabilityUpdated(url.mojom.Url url, bool available); 150 OnScreenAvailabilityUpdated(url.mojom.Url url, bool available);
148 151
152 // See PresentationService::SetDefaultPresentationURL.
153 OnDefaultSessionStarted(PresentationSessionInfo sessionInfo);
154
155 //////////////////////////////////////////////////////////////////////////////
156
149 // Called when the state of PresentationConnection |connection| started on 157 // Called when the state of PresentationConnection |connection| started on
150 // this frame has changed to |newState|. 158 // this frame has changed to |newState|.
151 OnConnectionStateChanged(PresentationSessionInfo connection, 159 OnConnectionStateChanged(PresentationSessionInfo connection,
152 PresentationConnectionState newState); 160 PresentationConnectionState newState);
153 161
154 // Caled when the state of |connection| started on this frame has changed to 162 // Caled when the state of |connection| started on this frame has changed to
155 // CLOSED. 163 // CLOSED.
156 OnConnectionClosed(PresentationSessionInfo connection, 164 OnConnectionClosed(PresentationSessionInfo connection,
157 PresentationConnectionCloseReason reason, 165 PresentationConnectionCloseReason reason,
158 string message); 166 string message);
159 167
160 // See PresentationService::ListenForSessionMessages. 168 // See PresentationService::ListenForSessionMessages.
161 OnSessionMessagesReceived(PresentationSessionInfo sessionInfo, 169 OnSessionMessagesReceived(PresentationSessionInfo sessionInfo,
162 array<SessionMessage> messages); 170 array<SessionMessage> messages);
163 171
164 // See PresentationService::SetDefaultPresentationURL. 172 // Called on a presentation receiver when the first presentation connection is
165 OnDefaultSessionStarted(PresentationSessionInfo sessionInfo); 173 // available from the controlling page.
166 174 OnReceiverConnectionAvailable(PresentationSessionInfo sessionInfo,
167 // See PresentationService::ListeningForReceiverPageRendered. 175 PresentationConnection connection);
168 OnReceiverConnectionAvailable(PresentationSessionInfo sessionInfo);
169 }; 176 };
OLDNEW
« no previous file with comments | « content/renderer/presentation/presentation_dispatcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698