Index: extensions/browser/api/sockets_tcp/sockets_tcp_api.h |
diff --git a/extensions/browser/api/sockets_tcp/sockets_tcp_api.h b/extensions/browser/api/sockets_tcp/sockets_tcp_api.h |
index 8195ca4a7480946a66d657b16b545cf14dcd1eec..94cc49164a720bcd10838341f9b86c4191c2b86f 100644 |
--- a/extensions/browser/api/sockets_tcp/sockets_tcp_api.h |
+++ b/extensions/browser/api/sockets_tcp/sockets_tcp_api.h |
@@ -10,6 +10,7 @@ |
namespace extensions { |
class ResumableTCPSocket; |
+class TLSSocket; |
} |
namespace extensions { |
@@ -238,6 +239,29 @@ class SocketsTcpGetSocketsFunction : public TCPSocketAsyncApiFunction { |
virtual void Work() OVERRIDE; |
}; |
+class SocketsTcpSecureFunction : public TCPSocketAsyncApiFunction { |
+ public: |
+ DECLARE_EXTENSION_FUNCTION("sockets.tcp.secure", SOCKETS_TCP_SECURE); |
+ |
+ SocketsTcpSecureFunction(); |
+ |
+ protected: |
+ virtual ~SocketsTcpSecureFunction(); |
+ virtual bool Prepare() OVERRIDE; |
+ virtual void AsyncWorkStart() OVERRIDE; |
+ |
+ private: |
+ virtual void TlsConnectDone(scoped_ptr<extensions::TLSSocket> sock, |
+ int result); |
+ |
+ bool paused_; |
+ bool persistent_; |
+ scoped_ptr<sockets_tcp::Secure::Params> params_; |
+ scoped_refptr<net::URLRequestContextGetter> url_request_getter_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(SocketsTcpSecureFunction); |
+}; |
+ |
} // namespace core_api |
} // namespace extensions |