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

Unified Diff: content/common/presentation/presentation_service.mojom

Issue 1436703002: Revert of [Presentation API / Media Router] Clean up default pres URL logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: content/common/presentation/presentation_service.mojom
diff --git a/content/common/presentation/presentation_service.mojom b/content/common/presentation/presentation_service.mojom
index 422ae5874d4d1a572136a7dadaf5557a824e8f4d..3256a965c6fcfc4a0ed9c6901ae5d9895967f1c7 100644
--- a/content/common/presentation/presentation_service.mojom
+++ b/content/common/presentation/presentation_service.mojom
@@ -42,13 +42,11 @@
};
interface PresentationService {
+ // Called when the frame sets or changes the default presentation URL.
+ SetDefaultPresentationURL(string url);
+
// Sets the PresentationServiceClient.
SetClient(PresentationServiceClient client);
-
- // Called when the frame sets or changes the default presentation URL.
- // When the default presentation is started on this frame,
- // PresentationServiceClient::OnDefaultSessionStarted will be invoked.
- SetDefaultPresentationURL(string url);
// Starts listening for screen availability for presentation of
// |url|. Availability results will be returned to the client via
@@ -59,6 +57,13 @@
// PresentationServiceClient will stop receiving availability updates for
// |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
@@ -84,8 +89,7 @@
// 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);
@@ -121,9 +125,5 @@
PresentationConnectionState newState);
// See PresentationService::ListenForSessionMessages.
- OnSessionMessagesReceived(PresentationSessionInfo sessionInfo,
- array<SessionMessage> messages);
-
- // See PresentationService::SetDefaultPresentationURL.
- OnDefaultSessionStarted(PresentationSessionInfo sessionInfo);
-};
+ OnSessionMessagesReceived(PresentationSessionInfo sessionInfo, array<SessionMessage> messages);
+};

Powered by Google App Engine
This is Rietveld 408576698