Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SOCKETS_TCP_SOCKETS_TCP_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SOCKETS_TCP_SOCKETS_TCP_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_SOCKETS_TCP_SOCKETS_TCP_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_SOCKETS_TCP_SOCKETS_TCP_API_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/extensions/api/socket/socket_api.h" | 8 #include "chrome/browser/extensions/api/socket/socket_api.h" |
| 9 #include "chrome/common/extensions/api/sockets_tcp.h" | 9 #include "chrome/common/extensions/api/sockets_tcp.h" |
| 10 | 10 |
| 11 namespace extensions { | 11 namespace extensions { |
| 12 class ResumableTCPSocket; | 12 class ResumableTCPSocket; |
| 13 class TLSSocket; | |
| 13 } | 14 } |
| 14 | 15 |
| 15 namespace extensions { | 16 namespace extensions { |
| 16 namespace api { | 17 namespace api { |
| 17 | 18 |
| 18 class TCPSocketAsyncApiFunction : public SocketAsyncApiFunction { | 19 class TCPSocketAsyncApiFunction : public SocketAsyncApiFunction { |
| 19 protected: | 20 protected: |
| 20 virtual ~TCPSocketAsyncApiFunction(); | 21 virtual ~TCPSocketAsyncApiFunction(); |
| 21 | 22 |
| 22 virtual scoped_ptr<SocketResourceManagerInterface> | 23 virtual scoped_ptr<SocketResourceManagerInterface> |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 232 SocketsTcpGetSocketsFunction(); | 233 SocketsTcpGetSocketsFunction(); |
| 233 | 234 |
| 234 protected: | 235 protected: |
| 235 virtual ~SocketsTcpGetSocketsFunction(); | 236 virtual ~SocketsTcpGetSocketsFunction(); |
| 236 | 237 |
| 237 // AsyncApiFunction: | 238 // AsyncApiFunction: |
| 238 virtual bool Prepare() OVERRIDE; | 239 virtual bool Prepare() OVERRIDE; |
| 239 virtual void Work() OVERRIDE; | 240 virtual void Work() OVERRIDE; |
| 240 }; | 241 }; |
| 241 | 242 |
| 243 class SocketsTcpSecureFunction : public TCPSocketAsyncApiFunction { | |
| 244 public: | |
| 245 DECLARE_EXTENSION_FUNCTION("sockets.tcp.secure", SOCKETS_TCP_SECURE); | |
| 246 SocketsTcpSecureFunction(); | |
| 247 protected: | |
|
Ryan Sleevi
2013/12/17 00:37:40
STYLE: Follow the local style (and dominant Chromi
lally
2014/01/09 18:47:16
Done.
| |
| 248 virtual ~SocketsTcpSecureFunction(); | |
| 249 virtual bool Prepare() OVERRIDE; | |
| 250 virtual void AsyncWorkStart() OVERRIDE; | |
| 251 private: | |
| 252 virtual void TlsConnectDone(extensions::TLSSocket* sock, int result); | |
| 253 scoped_ptr<api::socket::Secure::Params> params_; | |
|
Ryan Sleevi
2013/12/17 00:37:40
style: Line break
lally
2014/01/09 18:47:16
Done.
| |
| 254 net::URLRequestContextGetter* url_request_getter_; | |
| 255 }; | |
| 256 | |
| 242 } // namespace api | 257 } // namespace api |
| 243 } // namespace extensions | 258 } // namespace extensions |
| 244 | 259 |
| 245 #endif // CHROME_BROWSER_EXTENSIONS_API_SOCKETS_TCP_SOCKETS_TCP_API_H_ | 260 #endif // CHROME_BROWSER_EXTENSIONS_API_SOCKETS_TCP_SOCKETS_TCP_API_H_ |
| OLD | NEW |