summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extensions/browser/api/display_source/wifi_display/wifi_display_session_service_impl.cc7
-rw-r--r--extensions/common/api/display_source.idl23
-rw-r--r--extensions/common/mojo/wifi_display_session_service.mojom4
3 files changed, 14 insertions, 20 deletions
diff --git a/extensions/browser/api/display_source/wifi_display/wifi_display_session_service_impl.cc b/extensions/browser/api/display_source/wifi_display/wifi_display_session_service_impl.cc
index 015eca3..08957fe 100644
--- a/extensions/browser/api/display_source/wifi_display/wifi_display_session_service_impl.cc
+++ b/extensions/browser/api/display_source/wifi_display/wifi_display_session_service_impl.cc
@@ -62,7 +62,7 @@ void WiFiDisplaySessionServiceImpl::Connect(int32_t sink_id,
DCHECK(client_);
// We support only one Wi-Fi Display session at a time.
if (delegate_->connection()) {
- client_->OnError(ERROR_TYPE_EXCEEDED_SESSION_LIMIT_ERROR,
+ client_->OnError(ERROR_TYPE_SESSION_LIMIT_ERROR,
kErrorCannotHaveMultipleSessions);
return;
}
@@ -72,8 +72,7 @@ void WiFiDisplaySessionServiceImpl::Connect(int32_t sink_id,
sinks.begin(), sinks.end(),
[sink_id](DisplaySourceSinkInfoPtr ptr) { return ptr->id == sink_id; });
if (found == sinks.end() || (*found)->state != SINK_STATE_DISCONNECTED) {
- client_->OnError(ERROR_TYPE_ESTABLISH_CONNECTION_ERROR,
- kErrorSinkNotAvailable);
+ client_->OnError(ERROR_TYPE_CONNECTION_ERROR, kErrorSinkNotAvailable);
return;
}
AuthenticationInfo auth_info;
@@ -182,7 +181,7 @@ void WiFiDisplaySessionServiceImpl::OnConnectFailed(
if (sink_id != sink_id_)
return;
DCHECK(client_);
- client_->OnError(ERROR_TYPE_ESTABLISH_CONNECTION_ERROR, message);
+ client_->OnError(ERROR_TYPE_CONNECTION_ERROR, message);
}
void WiFiDisplaySessionServiceImpl::OnDisconnectFailed(
diff --git a/extensions/common/api/display_source.idl b/extensions/common/api/display_source.idl
index 83cfa0d..00434a6 100644
--- a/extensions/common/api/display_source.idl
+++ b/extensions/common/api/display_source.idl
@@ -6,31 +6,22 @@
// session using WebMediaStreamTrack as sources.
namespace displaySource {
enum ErrorType {
- // Cannot create media pipeline from the given media stream which could be
- // appropriate for a Display session (e.g., necessary codecs are missing
- // on the platform).
- create_media_pipeline_error,
-
// A new Display session cannot be started before the existing one is
// terminated.
- exceeded_session_limit_error,
+ session_limit_error,
- // Could not establish connection to the sink.
- establish_connection_error,
+ // The connection with sink cannot be established or has dropped
+ // unexpectedly.
+ connection_error,
// The capabilities of this Display Source and the connected
// sink do not fit (e.g. the sink cannot play the media content of
// the formats given by the source).
capabilities_negotiation_error,
- // There was an error while packetizing and sending the media content.
- media_send_error,
-
- // The TCP connection with sink has dropped unexpectedly.
- connection_error,
-
- // An unexpected message has arrived from the sink.
- unexpected_message_error,
+ // There was an error in media pipeline: while encoding, packetizing or
+ // sending the media content.
+ media_pipeline_error,
// The sink became unresponsive.
timeout_error,
diff --git a/extensions/common/mojo/wifi_display_session_service.mojom b/extensions/common/mojo/wifi_display_session_service.mojom
index 637a1f0..025ed7f 100644
--- a/extensions/common/mojo/wifi_display_session_service.mojom
+++ b/extensions/common/mojo/wifi_display_session_service.mojom
@@ -10,6 +10,8 @@ interface WiFiDisplaySessionService {
SetClient(WiFiDisplaySessionServiceClient client);
// Requires connection to a sink using the given authentication information.
+ // Note: 'auth_method' values must correspond to 'enum AuthenticationMethod'
+ // from display_source.idl
Connect(int32 sink_id, int32 auth_method, string auth_data);
// Drops the established connection to the connected sink.
@@ -27,6 +29,8 @@ interface WiFiDisplaySessionServiceClient {
OnTerminated();
// Notification of an error occurred during the session.
+ // Note: 'type' values must correspond to 'enum ErrorType'
+ // from display_source.idl
OnError(int32 type, string description);
// Invoked to transmit a controlling message from