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

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

Issue 1406013003: [Presentation API / Media Router] Clean up default pres URL logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Original patch 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 3256a965c6fcfc4a0ed9c6901ae5d9895967f1c7..422ae5874d4d1a572136a7dadaf5557a824e8f4d 100644
--- a/content/common/presentation/presentation_service.mojom
+++ b/content/common/presentation/presentation_service.mojom
@@ -42,12 +42,14 @@ struct SessionMessage {
};
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
// PresentationServiceClient::OnScreenAvailabilityUpdated.
@@ -58,13 +60,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
@@ -89,7 +84,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);
@@ -125,5 +121,9 @@ interface PresentationServiceClient {
PresentationConnectionState newState);
// See PresentationService::ListenForSessionMessages.
- OnSessionMessagesReceived(PresentationSessionInfo sessionInfo, array<SessionMessage> messages);
-};
+ OnSessionMessagesReceived(PresentationSessionInfo sessionInfo,
+ array<SessionMessage> messages);
+
+ // See PresentationService::SetDefaultPresentationURL.
+ OnDefaultSessionStarted(PresentationSessionInfo sessionInfo);
+};

Powered by Google App Engine
This is Rietveld 408576698