| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // The <code>chrome.displaySource</code> API creates a Display | 5 // The <code>chrome.displaySource</code> API creates a Display |
| 6 // session using WebMediaStreamTrack as sources. | 6 // session using WebMediaStreamTrack as sources. |
| 7 namespace displaySource { | 7 [use_movable_types=true] namespace displaySource { |
| 8 enum ErrorType { | 8 enum ErrorType { |
| 9 // The connection with sink cannot be established or has dropped | 9 // The connection with sink cannot be established or has dropped |
| 10 // unexpectedly. | 10 // unexpectedly. |
| 11 connection_error, | 11 connection_error, |
| 12 | 12 |
| 13 // The capabilities of this Display Source and the connected | 13 // The capabilities of this Display Source and the connected |
| 14 // sink do not fit (e.g. the sink cannot play the media content of | 14 // sink do not fit (e.g. the sink cannot play the media content of |
| 15 // the formats given by the source). | 15 // the formats given by the source). |
| 16 capabilities_negotiation_error, | 16 capabilities_negotiation_error, |
| 17 | 17 |
| 18 // There was an error in media pipeline: while encoding, packetizing or | 18 // There was an error in media pipeline: while encoding, packetizing or |
| 19 // sending the media content. | 19 // sending the media content. |
| 20 media_pipeline_error, | 20 media_pipeline_error, |
| 21 | 21 |
| 22 // The sink became unresponsive. | 22 // The sink became unresponsive. |
| 23 timeout_error, | 23 timeout_error, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 callback GetSinksCallback = void (SinkInfo[] result); | 77 callback GetSinksCallback = void (SinkInfo[] result); |
| 78 callback RequestAuthenticationCallback = void (AuthenticationInfo result); | 78 callback RequestAuthenticationCallback = void (AuthenticationInfo result); |
| 79 | 79 |
| 80 // The callback is used by <code>startSession, terminateSession</code> | 80 // The callback is used by <code>startSession, terminateSession</code> |
| 81 // to signal completion. The callback is called with | 81 // to signal completion. The callback is called with |
| 82 // <code>chrome.runtime.lastError</code> set to error | 82 // <code>chrome.runtime.lastError</code> set to error |
| 83 // message if the call has failed. | 83 // message if the call has failed. |
| 84 [inline_doc] callback CallCompleteCallback = void (); | 84 [inline_doc] callback CallCompleteCallback = void (); |
| 85 | 85 |
| 86 interface Functions { | 86 interface Functions { |
| 87 // Queries the list of the currently available Display sinks. | 87 // Queries the list of the currently available Display sinks. |
| 88 // | 88 // |
| 89 // |callback| : Called when the request is completed. The argument list | 89 // |callback| : Called when the request is completed. The argument list |
| 90 // is empty if no available sinks were found. | 90 // is empty if no available sinks were found. |
| 91 static void getAvailableSinks(GetSinksCallback callback); | 91 static void getAvailableSinks(GetSinksCallback callback); |
| 92 | 92 |
| 93 // Queries authentication data from the sink device. | 93 // Queries authentication data from the sink device. |
| 94 // | 94 // |
| 95 // |sinkId| : Id of the sink | 95 // |sinkId| : Id of the sink |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 // Event fired when the Display session is terminated. | 134 // Event fired when the Display session is terminated. |
| 135 // |sinkId| Id of the peer sink | 135 // |sinkId| Id of the peer sink |
| 136 [nocompile] static void onSessionTerminated(long sinkId); | 136 [nocompile] static void onSessionTerminated(long sinkId); |
| 137 // Event fired when an error occurs. | 137 // Event fired when an error occurs. |
| 138 // |sinkId| Id of the peer sink | 138 // |sinkId| Id of the peer sink |
| 139 // |errorInfo| error description | 139 // |errorInfo| error description |
| 140 [nocompile] static void onSessionErrorOccured(long sinkId, | 140 [nocompile] static void onSessionErrorOccured(long sinkId, |
| 141 ErrorInfo errorInfo); | 141 ErrorInfo errorInfo); |
| 142 }; | 142 }; |
| 143 }; | 143 }; |
| OLD | NEW |