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

Unified Diff: chrome/browser/extensions/api/socket/socket_api.h

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/browser/extensions/api/socket/socket.cc ('k') | chrome/browser/extensions/api/socket/socket_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/socket/socket_api.h
diff --git a/chrome/browser/extensions/api/socket/socket_api.h b/chrome/browser/extensions/api/socket/socket_api.h
index 87ea8f808d8ef7f45cb45020a431da57b2f78829..fbbbeed8dcdec07af850208ff37d611bea618860 100644
--- a/chrome/browser/extensions/api/socket/socket_api.h
+++ b/chrome/browser/extensions/api/socket/socket_api.h
@@ -73,7 +73,8 @@ class SocketCreateFunction : public SocketExtensionFunction {
enum SocketType {
kSocketTypeInvalid = -1,
kSocketTypeTCP,
- kSocketTypeUDP
+ kSocketTypeUDP,
+ kSocketTypeSSL
};
scoped_ptr<api::experimental_socket::Create::Params> params_;
@@ -122,6 +123,24 @@ class SocketConnectFunction : public SocketExtensionWithDnsLookupFunction {
int port_;
};
+class SocketHandshakeFunction : public SocketExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.socket.handshake")
+
+ protected:
+ virtual ~SocketHandshakeFunction() {}
+
+ // AsyncAPIFunction:
+ virtual bool Prepare() OVERRIDE;
+ virtual void AsyncWorkStart() OVERRIDE;
+ void OnCompleted(int result);
+
+ private:
+ int socket_id_;
+ std::string ssl_hostname_;
+ int ssl_port_;
+};
+
class SocketDisconnectFunction : public SocketExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION_NAME("experimental.socket.disconnect")
« no previous file with comments | « chrome/browser/extensions/api/socket/socket.cc ('k') | chrome/browser/extensions/api/socket/socket_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698