summaryrefslogtreecommitdiffstats
path: root/extensions/common
diff options
context:
space:
mode:
authormikhail.pozdnyakov <mikhail.pozdnyakov@intel.com>2016-02-26 02:48:10 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-26 10:49:03 +0000
commitef88b05837e968daf0389fce203c81dba16c17ed (patch)
treeb7c3b092eae814e263f999556c4957f4060abcf5 /extensions/common
parent9c7c38629b18307b8d03e3cdeca0ebb37e2b978c (diff)
downloadchromium_src-ef88b05837e968daf0389fce203c81dba16c17ed.zip
chromium_src-ef88b05837e968daf0389fce203c81dba16c17ed.tar.gz
chromium_src-ef88b05837e968daf0389fce203c81dba16c17ed.tar.bz2
[chrome.displaySource] further implementation of call completion callbacks
The API implementation determines when and with which arguments the 'startSession'/'terminateSession' completion callbacks are invoked. The 'exceeded_session_limit_error' session error type is eliminated and substituted with 'startSession' completion callback call (which is more natural since this problem is detected before a new session is started). JS bindings code is simplified. BUG=242107 Review URL: https://codereview.chromium.org/1730583002 Cr-Commit-Position: refs/heads/master@{#377864}
Diffstat (limited to 'extensions/common')
-rw-r--r--extensions/common/api/display_source.idl4
-rw-r--r--extensions/common/mojo/wifi_display_session_service.mojom8
2 files changed, 7 insertions, 5 deletions
diff --git a/extensions/common/api/display_source.idl b/extensions/common/api/display_source.idl
index 00434a6..0659b51 100644
--- a/extensions/common/api/display_source.idl
+++ b/extensions/common/api/display_source.idl
@@ -6,10 +6,6 @@
// session using WebMediaStreamTrack as sources.
namespace displaySource {
enum ErrorType {
- // A new Display session cannot be started before the existing one is
- // terminated.
- session_limit_error,
-
// The connection with sink cannot be established or has dropped
// unexpectedly.
connection_error,
diff --git a/extensions/common/mojo/wifi_display_session_service.mojom b/extensions/common/mojo/wifi_display_session_service.mojom
index 025ed7f..f664a5f 100644
--- a/extensions/common/mojo/wifi_display_session_service.mojom
+++ b/extensions/common/mojo/wifi_display_session_service.mojom
@@ -23,11 +23,17 @@ interface WiFiDisplaySessionService {
interface WiFiDisplaySessionServiceClient {
// Notification of a successfull connection to a sink.
- OnEstablished(string ip_address);
+ OnConnected(string ip_address);
+
+ // Notification of a handled connection request.
+ OnConnectRequestHandled(bool success, string error_message);
// Notification of a session termination.
OnTerminated();
+ // Notification of a handled termination request.
+ OnDisconnectRequestHandled(bool success, string error_message);
+
// Notification of an error occurred during the session.
// Note: 'type' values must correspond to 'enum ErrorType'
// from display_source.idl