Chromium Code Reviews| Index: extensions/common/api/sockets_tcp.idl |
| diff --git a/extensions/common/api/sockets_tcp.idl b/extensions/common/api/sockets_tcp.idl |
| index 0fd80957f4a69dc5802964267cda3a00c89ea2c9..e09050dd136d0f1e822bc3d6ba053c5a18217739 100644 |
| --- a/extensions/common/api/sockets_tcp.idl |
| +++ b/extensions/common/api/sockets_tcp.idl |
| @@ -80,6 +80,20 @@ namespace sockets.tcp { |
| // A negative value indicates an error. |
| callback SetNoDelayCallback = void (long result); |
| + dictionary TLSVersionConstraints { |
| + // The minimum and maximum acceptable versions of TLS. These will |
| + // be <code>ssl3</code>, <code>tls1</code>, <code>tls1.1</code>, |
| + // or <code>tls1.2</code>. |
| + DOMString? min; |
|
Marijn Kruisselbrink
2014/07/24 22:44:08
I'd say that this should be an enum, but apparentl
lally
2014/07/26 15:25:17
Acknowledged.
|
| + DOMString? max; |
| + }; |
| + |
| + dictionary SecureOptions { |
| + TLSVersionConstraints? tlsVersion; |
| + }; |
| + |
| + callback SecureCallback = void (long result); |
| + |
| // Result of the <code>getInfo</code> method. |
| dictionary SocketInfo { |
| // The socket identifier. |
| @@ -209,6 +223,14 @@ namespace sockets.tcp { |
| static void disconnect(long socketId, |
| optional DisconnectCallback callback); |
| + // Start a TLS client connection over the connected TCP client socket. |
| + // |socketId| : The existing, connected socket to use. |
| + // |options| : Constraints and parameters for the TLS connection. |
| + // |callback| : Called when the connection attempt is complete. |
| + static void secure(long socketId, |
| + optional SecureOptions options, |
| + SecureCallback callback); |
| + |
| // Sends data on the given TCP socket. |
| // |socketId| : The socket identifier. |
| // |data| : The data to send. |