From ef0d3aa8a2e82e6db356e112c236ef0f8a2a8918 Mon Sep 17 00:00:00 2001 From: "mikhail.pozdnyakov" Date: Thu, 11 Feb 2016 11:42:24 -0800 Subject: [chrome.displaySource] Session notification improvements This patch provides several fixes and improvements (simplifications) to the session life cycle notification mechanism: 1) The 'startSession'/'terminateSession' call completion callbacks are invoked when the session is actually started/terminated and in accordance with 'onSessionStarted'/'onSessionTerminated' events propagating (and as per documentation). 2) The notification from the required sink is filtered out in browser process avoiding unneeded IPC calls 3) Methods in mojo interface are renamed in order to improve readability BUG=242107 Review URL: https://codereview.chromium.org/1674583002 Cr-Commit-Position: refs/heads/master@{#374929} --- extensions/common/api/display_source.idl | 3 --- extensions/common/mojo/wifi_display_session_service.mojom | 8 ++++---- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'extensions/common') diff --git a/extensions/common/api/display_source.idl b/extensions/common/api/display_source.idl index f65a82a..83cfa0d 100644 --- a/extensions/common/api/display_source.idl +++ b/extensions/common/api/display_source.idl @@ -144,9 +144,6 @@ namespace displaySource { // or properties) // |sinks| the list of all currently available sinks static void onSinksUpdated(SinkInfo[] sinks); - // Event fired when the Display session is started. - // |sinkId| Id of the peer sink - [nocompile] static void onSessionStarted(long sinkId); // Event fired when the Display session is terminated. // |sinkId| Id of the peer sink [nocompile] static void onSessionTerminated(long sinkId); diff --git a/extensions/common/mojo/wifi_display_session_service.mojom b/extensions/common/mojo/wifi_display_session_service.mojom index e302256..637a1f0 100644 --- a/extensions/common/mojo/wifi_display_session_service.mojom +++ b/extensions/common/mojo/wifi_display_session_service.mojom @@ -21,13 +21,13 @@ interface WiFiDisplaySessionService { interface WiFiDisplaySessionServiceClient { // Notification of a successfull connection to a sink. - OnConnected(int32 sink_id, string ip_address); + OnEstablished(string ip_address); - // Notification of a connection termination. - OnDisconnected(int32 sink_id); + // Notification of a session termination. + OnTerminated(); // Notification of an error occurred during the session. - OnError(int32 sink_id, int32 type, string description); + OnError(int32 type, string description); // Invoked to transmit a controlling message from // the connected sink. -- cgit v1.1