Index: content/common/presentation/presentation_service.mojom |
diff --git a/content/common/presentation/presentation_service.mojom b/content/common/presentation/presentation_service.mojom |
index e201791642a0fc5ccf4128ecf03dff3e1d27e365..d072ff316d1910815d4477dbefcdda7c2b21a150 100644 |
--- a/content/common/presentation/presentation_service.mojom |
+++ b/content/common/presentation/presentation_service.mojom |
@@ -42,6 +42,8 @@ struct SessionMessage { |
interface PresentationService { |
// Called when the frame sets or changes the default presentation URL. |
+ // When the default presentation is started on this frame, |
+ // PresentationServiceClient::OnDefaultPresentationStarted will be invoked. |
SetDefaultPresentationURL(string url); |
// Sets the PresentationServiceClient. |
@@ -57,13 +59,6 @@ interface PresentationService { |
// |url|. |
StopListeningForScreenAvailability(string url); |
- // Called when the renderer is ready to receive the browser initiated |
- // session. If the default session is started by the embedder before this |
- // call, the embedder may queue it and run the callback when the call is |
- // performed. |
- ListenForDefaultSessionStart() |
- => (PresentationSessionInfo? defaultSessionInfo); |
- |
// Called when startSession() is called by the frame. The result callback |
// will return a non-null and valid PresentationSessionInfo if starting the |
// session succeeded, or null with a PresentationError if starting the |
@@ -88,7 +83,8 @@ interface PresentationService { |
// The false in the result callback notifies the renderer to stop sending |
// the send requests and invalidate all pending requests. This occurs |
// for eg., when frame is deleted or navigated away. |
- SendSessionMessage(PresentationSessionInfo sessionInfo, SessionMessage message_request) => (bool success); |
+ SendSessionMessage(PresentationSessionInfo sessionInfo, |
+ SessionMessage message_request) => (bool success); |
// Called when closeSession() is called by the frame. |
CloseSession(string presentation_url, string presentation_id); |
@@ -104,6 +100,15 @@ interface PresentationService { |
// PresentationServiceClient::OnSessionMessagesReceived. |
// This is called after a presentation session is created. |
ListenForSessionMessages(PresentationSessionInfo sessionInfo); |
+ |
+ // Returns a PresentationSessionInfo object for this frame, if it is the main |
+ // frame of an offscreen presentation. Otherwise returns null. |
+ // The PresentationSessionInfo object returned will have url set to empty, and |
+ // id set to the ID of the offscreen presentation. |
+ // If a receiver presentation session never becomes available, null will be |
+ // returned right before this request becomes invalid (e.g., due to frame |
+ // deletion, frame navigation). |
+ GetPresentationReceiverSession() => (PresentationSessionInfo? session_info); |
}; |
interface PresentationServiceClient { |
@@ -125,4 +130,7 @@ interface PresentationServiceClient { |
// See PresentationService::ListenForSessionMessages. |
OnSessionMessagesReceived(PresentationSessionInfo sessionInfo, array<SessionMessage> messages); |
+ |
+ // See PresentationService::SetDefaultPresentationURL. |
+ OnDefaultPresentationStarted(PresentationSessionInfo sessionInfo); |
}; |