Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: chrome/common/extensions/api/sockets_tcp.idl

Issue 76403004: An implementation of chrome.socket.secure(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another round of responses to Renaud. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698