Index: chrome/common/extensions/api/sockets_tcp.idl |
diff --git a/chrome/common/extensions/api/sockets_tcp.idl b/chrome/common/extensions/api/sockets_tcp.idl |
index f6cbc5128875da2598784671fc6cb174e1ba7b29..3095096b32fa6f273179d89e2327a7b78de67e1f 100644 |
--- a/chrome/common/extensions/api/sockets_tcp.idl |
+++ b/chrome/common/extensions/api/sockets_tcp.idl |
@@ -80,6 +80,17 @@ namespace sockets.tcp { |
// A negative value indicates an error. |
callback SetNoDelayCallback = void (long result); |
+ dictionary TLSVersionConstraints { |
+ DOMString? min; |
+ 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 +220,14 @@ namespace sockets.tcp { |
static void disconnect(long socketId, |
optional DisconnectCallback callback); |
+ // Start a TLS client connection over the 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. |