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

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

Issue 10580028: Experimental support for SSL in platform apps sockets. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 8 years, 5 months 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
« no previous file with comments | « chrome/chrome_browser_extensions.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/experimental_socket.idl
diff --git a/chrome/common/extensions/api/experimental_socket.idl b/chrome/common/extensions/api/experimental_socket.idl
index bb17d763ca27f4ffc83d182dadbbe306a2d3c973..adc548544fa0da4f308f5c7f1d7bdce9bafea37a 100644
--- a/chrome/common/extensions/api/experimental_socket.idl
+++ b/chrome/common/extensions/api/experimental_socket.idl
@@ -7,7 +7,8 @@
namespace experimental.socket {
enum SocketType {
tcp,
- udp
+ udp,
+ ssl
};
// The socket options.
@@ -26,6 +27,8 @@ namespace experimental.socket {
callback ConnectCallback = void (long result);
+ callback HandshakeCallback = void (long result);
+
callback BindCallback = void (long result);
dictionary ReadInfo {
@@ -86,6 +89,19 @@ namespace experimental.socket {
long port,
ConnectCallback callback);
+ // Performs an SSL handshake. While a handshake is in flight, calls to
+ // read and write using the socket will fail.
+ // |socketId| : The socketId of an SSL socket.
+ // |hostname| : The hostname to check against the name(s) in the server's
+ // certificate during the SSL handshake.
+ // |port| : The port to check during the SSL handshake.
+ // |callback| : Called when the connection attempt is complete.
+ // Zero signifies success. Non-'ssl' sockets always pass -1.
+ static void handshake(long socketId,
+ DOMString hostname,
+ long port,
+ HandshakeCallback callback);
+
// Binds the local address for socket. Currently, it does not support
// TCP socket.
// |socketId| : The socketId.
@@ -147,6 +163,7 @@ namespace experimental.socket {
SendToCallback callback);
// Enable/disable keep-alive functionality for a TCP connection.
+ // Invalid on SSL sockets after the handshake has completed.
// |socketId| : The socketId.
// |enable| : If true, enable keep-alive functionality.
// |delay| : Set the delay seconds between the last data packet received
@@ -157,7 +174,8 @@ namespace experimental.socket {
optional long delay,
SetKeepAliveCallback callback);
- // Enable/disable Nagle algorithm.
+ // Enable/disable Nagle algorithm. Invalid on SSL sockets after the
+ // handshake has completed.
// |socketId| : The socketId.
// |noDelay| : If true, disable Nagle algorithm.
// |callback| : Called when the setNoDelay attempt is complete.
« no previous file with comments | « chrome/chrome_browser_extensions.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698