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..a43fa64c652e7bd1e719f3ddffe3bf6f7f5cb97e 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,7 +239,30 @@ 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 |
#endif // EXTENSIONS_BROWSER_API_SOCKETS_TCP_SOCKETS_TCP_API_H_ |