| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // API for communicating with a Google Cast device over an authenticated | 5 // API for communicating with a Google Cast device over an authenticated |
| 6 // channel. | 6 // channel. |
| 7 namespace cast.channel { | 7 namespace cast.channel { |
| 8 | 8 |
| 9 // The state of the channel. | 9 // The state of the channel. |
| 10 enum ReadyState { | 10 enum ReadyState { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // The port number to connect to, 0-65535. | 66 // The port number to connect to, 0-65535. |
| 67 long port; | 67 long port; |
| 68 | 68 |
| 69 // The amount of time to wait in milliseconds before stopping the | 69 // The amount of time to wait in milliseconds before stopping the |
| 70 // connection process. Timeouts are disabled if the value is zero. | 70 // connection process. Timeouts are disabled if the value is zero. |
| 71 // The default timeout is 8000ms. | 71 // The default timeout is 8000ms. |
| 72 long? timeout; | 72 long? timeout; |
| 73 | 73 |
| 74 // The authentication method required for the channel. | 74 // The authentication method required for the channel. |
| 75 ChannelAuthType auth; | 75 ChannelAuthType auth; |
| 76 |
| 77 // If set, CastDeviceCapability bitmask values describing capability of the |
| 78 // cast device. |
| 79 long? capabilities; |
| 76 }; | 80 }; |
| 77 | 81 |
| 78 // Describes the state of a channel to a Cast receiver. | 82 // Describes the state of a channel to a Cast receiver. |
| 79 dictionary ChannelInfo { | 83 dictionary ChannelInfo { |
| 80 // Id for the channel. | 84 // Id for the channel. |
| 81 long channelId; | 85 long channelId; |
| 82 | 86 |
| 83 // DEPRECATED: The URL to the receiver. This field will be removed in a | 87 // DEPRECATED: The URL to the receiver. This field will be removed in a |
| 84 // future release. | 88 // future release. |
| 85 DOMString url; | 89 DOMString url; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 interface Events { | 214 interface Events { |
| 211 // Fired when a message is received on an open channel. | 215 // Fired when a message is received on an open channel. |
| 212 static void onMessage(ChannelInfo channel, | 216 static void onMessage(ChannelInfo channel, |
| 213 MessageInfo message); | 217 MessageInfo message); |
| 214 | 218 |
| 215 // Fired when an error occurs as a result of a channel operation or a | 219 // Fired when an error occurs as a result of a channel operation or a |
| 216 // network event. |error| contains details of the error. | 220 // network event. |error| contains details of the error. |
| 217 static void onError(ChannelInfo channel, ErrorInfo error); | 221 static void onError(ChannelInfo channel, ErrorInfo error); |
| 218 }; | 222 }; |
| 219 }; | 223 }; |
| OLD | NEW |