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

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

Issue 1314413005: [Presentation API] 1-UA presentation support + presenter APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // When state change occurs, PresentationServiceClient::OnSessionStateChanged 97 // When state change occurs, PresentationServiceClient::OnSessionStateChanged
98 // will be invoked with the session and its new state. 98 // will be invoked with the session and its new state.
99 // This is called after a presentation session is created. 99 // This is called after a presentation session is created.
100 ListenForSessionStateChange(); 100 ListenForSessionStateChange();
101 101
102 // Starts listening for messages for session with |sessionInfo|. 102 // Starts listening for messages for session with |sessionInfo|.
103 // Messages will be received in 103 // Messages will be received in
104 // PresentationServiceClient::OnSessionMessagesReceived. 104 // PresentationServiceClient::OnSessionMessagesReceived.
105 // This is called after a presentation session is created. 105 // This is called after a presentation session is created.
106 ListenForSessionMessages(PresentationSessionInfo sessionInfo); 106 ListenForSessionMessages(PresentationSessionInfo sessionInfo);
107
108 // Gets a single presenter PresentationSessionInfo object for the 1-UA
109 // presentation that was presented onto this frame.
110 // If the calling frame is not a presenter frame, null will be returned.
111 // Otherwise, a presenter PresentationSessionInfo object will be returned,
112 // with url set to empty, and id set to the Id of the 1-UA presentation.
113 GetPresenterSession() => (PresentationSessionInfo? session_info);
107 }; 114 };
108 115
109 interface PresentationServiceClient { 116 interface PresentationServiceClient {
110 // Called when the client tries to listen for screen availability changes for 117 // Called when the client tries to listen for screen availability changes for
111 // presentation of |url| but it is not supported by the device or underlying 118 // presentation of |url| but it is not supported by the device or underlying
112 // platform. This can also be called if the device is currently in a mode 119 // platform. This can also be called if the device is currently in a mode
113 // where it can't do screen discoveries (eg. low battery). 120 // where it can't do screen discoveries (eg. low battery).
114 OnScreenAvailabilityNotSupported(string url); 121 OnScreenAvailabilityNotSupported(string url);
115 122
116 // Called when the client is listening for screen availability for 123 // Called when the client is listening for screen availability for
117 // presentation of |url| and the state changes. When the client starts to 124 // presentation of |url| and the state changes. When the client starts to
118 // listen for screen availability, this method will always be called to give 125 // listen for screen availability, this method will always be called to give
119 // the current known state. It will then be called to notify of state updates. 126 // the current known state. It will then be called to notify of state updates.
120 OnScreenAvailabilityUpdated(string url, bool available); 127 OnScreenAvailabilityUpdated(string url, bool available);
121 128
122 // See PresentationService::ListenForSessionStateChange. 129 // See PresentationService::ListenForSessionStateChange.
123 OnSessionStateChanged(PresentationSessionInfo sessionInfo, 130 OnSessionStateChanged(PresentationSessionInfo sessionInfo,
124 PresentationSessionState newState); 131 PresentationSessionState newState);
125 132
126 // See PresentationService::ListenForSessionMessages. 133 // See PresentationService::ListenForSessionMessages.
127 OnSessionMessagesReceived(PresentationSessionInfo sessionInfo, array<SessionMe ssage> messages); 134 OnSessionMessagesReceived(PresentationSessionInfo sessionInfo, array<SessionMe ssage> messages);
128 }; 135 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698