diff options
author | mikhail.pozdnyakov <mikhail.pozdnyakov@intel.com> | 2016-02-11 11:42:24 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-11 19:43:47 +0000 |
commit | ef0d3aa8a2e82e6db356e112c236ef0f8a2a8918 (patch) | |
tree | c1d439680acee131a2290b1ca36b00dac9d3ebaa /extensions/common | |
parent | 0f0f3981f6ca07546cd9208c202ee512d4c807ba (diff) | |
download | chromium_src-ef0d3aa8a2e82e6db356e112c236ef0f8a2a8918.zip chromium_src-ef0d3aa8a2e82e6db356e112c236ef0f8a2a8918.tar.gz chromium_src-ef0d3aa8a2e82e6db356e112c236ef0f8a2a8918.tar.bz2 |
[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}
Diffstat (limited to 'extensions/common')
-rw-r--r-- | extensions/common/api/display_source.idl | 3 | ||||
-rw-r--r-- | extensions/common/mojo/wifi_display_session_service.mojom | 8 |
2 files changed, 4 insertions, 7 deletions
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. |