| Index: third_party/WebKit/public/platform/modules/presentation/presentation.mojom | 
| diff --git a/third_party/WebKit/public/platform/modules/presentation/presentation.mojom b/third_party/WebKit/public/platform/modules/presentation/presentation.mojom | 
| index 8074fa81807edc1a350e93fcc45b2af0eacf5b0f..a511c07fd7382b12794aa153d71376e12b9b444b 100644 | 
| --- a/third_party/WebKit/public/platform/modules/presentation/presentation.mojom | 
| +++ b/third_party/WebKit/public/platform/modules/presentation/presentation.mojom | 
| @@ -2,13 +2,11 @@ | 
| // Use of this source code is governed by a BSD-style license that can be | 
| // found in the LICENSE file. | 
|  | 
| -// TODO(crbug.com/647290): Rename "Session" to "Connection" | 
| - | 
| module blink.mojom; | 
|  | 
| import "url/mojo/url.mojom"; | 
|  | 
| -struct PresentationSessionInfo { | 
| +struct PresentationInfo { | 
| url.mojom.Url url; | 
| string id; | 
| }; | 
| @@ -28,7 +26,7 @@ enum PresentationConnectionCloseReason { | 
|  | 
| enum PresentationErrorType { | 
| NO_AVAILABLE_SCREENS, | 
| -  SESSION_REQUEST_CANCELLED, | 
| +  PRESENTATION_REQUEST_CANCELLED, | 
| NO_PRESENTATION_FOUND, | 
| PREVIOUS_START_IN_PROGRESS, | 
| UNKNOWN, | 
| @@ -66,7 +64,7 @@ interface PresentationService { | 
|  | 
| // Called when the frame sets or changes the default presentation URLs. | 
| // When the default presentation is started on this frame, | 
| -  // PresentationServiceClient::OnDefaultSessionStarted will be invoked. | 
| +  // PresentationServiceClient::OnDefaultPresentationStarted will be invoked. | 
| SetDefaultPresentationUrls(array<url.mojom.Url> presentation_urls); | 
|  | 
| // Starts listening for screen availability for presentation of | 
| @@ -79,30 +77,24 @@ interface PresentationService { | 
| // |url|. | 
| StopListeningForScreenAvailability(url.mojom.Url availability_url); | 
|  | 
| -  // 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 | 
| -  // session failed. | 
| -  // The presentation id returned in |sessionInfo| on success is generated by | 
| -  // the UA. | 
| -  // If the UA identifies a matching session (same presentation url), the user | 
| -  // may choose this existing session and the page will join it rather than get | 
| -  // a new one. | 
| -  StartSession(array<url.mojom.Url> presentation_urls) | 
| -      => (PresentationSessionInfo? sessionInfo, PresentationError? error); | 
| - | 
| -  // Called when joinSession() is called by the frame. The result callback | 
| -  // works the same as for the method above. JoinSession will join a known | 
| -  // session (i.e. when the page navigates or the user opens another tab) | 
| -  // silently and without user action. | 
| -  JoinSession(array<url.mojom.Url> presentation_urls, string? presentation_id) | 
| -      => (PresentationSessionInfo? sessionInfo, PresentationError? error); | 
| - | 
| -  // Called in StartSession's callback function for offscreen presentation only. | 
| +  // Called when start() is called by the frame. The result callback | 
| +  // will return a non-null and valid PresentationInfo if starting the | 
| +  // presentation succeeded, or null with a PresentationError if starting the | 
| +  // presentation failed. | 
| +  StartPresentation(array<url.mojom.Url> presentation_urls) | 
| +      => (PresentationInfo? presentation_info, PresentationError? error); | 
| + | 
| +  // Called when reconnect() is called by the frame. The result callback | 
| +  // works the same as for the method above. reconnect() will create a new | 
| +  // connection to a presentation with the matching URL and id. | 
| +  ReconnectPresentation(array<url.mojom.Url> presentation_urls, string? presentation_id) | 
| +      => (PresentationInfo? presentation_info, PresentationError? error); | 
| + | 
| +  // Called in StartPresentation's callback function for offscreen presentation only. | 
| // It passes in controlling frame's PresentationConnection and | 
| // PresentationConnectionRequest to PresentationService. | 
| SetPresentationConnection( | 
| -      PresentationSessionInfo sessionInfo, | 
| +      PresentationInfo presentation_info, | 
| PresentationConnection controller_connection_ptr, | 
| PresentationConnection& receiver_connection_request); | 
|  | 
| @@ -113,16 +105,16 @@ interface PresentationService { | 
| // Called when terminate() is called by the frame. | 
| Terminate(url.mojom.Url presentation_url, string presentation_id); | 
|  | 
| -  // Starts listening for messages for session with |sessionInfo|. | 
| +  // Starts listening for messages on the presentation identified by |presentation_info|. | 
| // Messages will be received in | 
| // PresentationServiceClient::OnConnectionMessagesReceived. | 
| -  // This is called after a presentation session is created. | 
| -  ListenForConnectionMessages(PresentationSessionInfo sessionInfo); | 
| -}; | 
| +  // This is called after a connection has been established to the presentation | 
| +  // from the frame. | 
| +  ListenForConnectionMessages(PresentationInfo presentation_info); | 
| +}; | 
|  | 
| interface PresentationServiceClient { | 
| - | 
| -  ////////////Functions here are called only on the controlling page./////////// | 
| +  //////////  This API is implemented by a controlling frame.  ///////////////// | 
|  | 
| // Called when the client tries to listen for screen availability changes for | 
| // presentation of |url| but it is not supported by the device or underlying | 
| @@ -137,29 +129,33 @@ interface PresentationServiceClient { | 
| OnScreenAvailabilityUpdated(url.mojom.Url url, bool available); | 
|  | 
| // See PresentationService::SetDefaultPresentationURL. | 
| -  OnDefaultSessionStarted(PresentationSessionInfo sessionInfo); | 
| +  OnDefaultPresentationStarted(PresentationInfo presentation_info); | 
|  | 
| -  ////////////////////////////////////////////////////////////////////////////// | 
| +  //////////  This API is implemented by an offscreen presentation frame.  ///// | 
| + | 
| +  // Called on a presentation receiver when a connection for |presentation_info| | 
| +  // is available from the controlling page. | 
| +  OnReceiverConnectionAvailable( | 
| +      PresentationInfo presentation_info, | 
| +      PresentationConnection controller_connection_ptr, | 
| +      PresentationConnection& receiver_connection_request); | 
| + | 
| +  //////////  This API is implemented by both frame types.  //////////////////// | 
|  | 
| // Called when the state of PresentationConnection |connection| started on | 
| // this frame has changed to |newState|. | 
| -  OnConnectionStateChanged(PresentationSessionInfo connection, | 
| +  OnConnectionStateChanged(PresentationInfo presentation_info, | 
| PresentationConnectionState newState); | 
|  | 
| -  // Caled when the state of |connection| started on this frame has changed to | 
| +  // Caled when the state of |presentation_info| started on this frame has changed to | 
| // CLOSED. | 
| -  OnConnectionClosed(PresentationSessionInfo connection, | 
| +  OnConnectionClosed(PresentationInfo presentation_info, | 
| PresentationConnectionCloseReason reason, | 
| string message); | 
|  | 
| // See PresentationService::ListenForConnectionMessages. | 
| -  OnConnectionMessagesReceived(PresentationSessionInfo sessionInfo, | 
| +  OnConnectionMessagesReceived(PresentationInfo presentation_info, | 
| array<PresentationConnectionMessage> messages); | 
|  | 
| -  // Called on a presentation receiver when presentation connection is available | 
| -  // from the controlling page. | 
| -  OnReceiverConnectionAvailable( | 
| -      PresentationSessionInfo sessionInfo, | 
| -      PresentationConnection controller_connection_ptr, | 
| -      PresentationConnection& receiver_connection_request); | 
| + | 
| }; | 
|  |