| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 NET_HTTP_HTTP_STREAM_FACTORY_H_ | 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_H_ |
| 6 #define NET_HTTP_HTTP_STREAM_FACTORY_H_ | 6 #define NET_HTTP_HTTP_STREAM_FACTORY_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 class GURL; | 26 class GURL; |
| 27 | 27 |
| 28 namespace base { | 28 namespace base { |
| 29 class Value; | 29 class Value; |
| 30 } | 30 } |
| 31 | 31 |
| 32 namespace net { | 32 namespace net { |
| 33 | 33 |
| 34 class AuthCredentials; | 34 class AuthCredentials; |
| 35 class BoundNetLog; | 35 class BoundNetLog; |
| 36 class BidirectionalStreamJob; |
| 36 class HostMappingRules; | 37 class HostMappingRules; |
| 37 class HostPortPair; | 38 class HostPortPair; |
| 38 class HttpAuthController; | 39 class HttpAuthController; |
| 39 class HttpNetworkSession; | 40 class HttpNetworkSession; |
| 40 class HttpResponseInfo; | 41 class HttpResponseInfo; |
| 41 class HttpServerProperties; | 42 class HttpServerProperties; |
| 42 class HttpStream; | 43 class HttpStream; |
| 43 class ProxyInfo; | 44 class ProxyInfo; |
| 44 class SSLCertRequestInfo; | 45 class SSLCertRequestInfo; |
| 45 class SSLInfo; | 46 class SSLInfo; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // |used_ssl_config| indicates the actual SSL configuration used for this | 78 // |used_ssl_config| indicates the actual SSL configuration used for this |
| 78 // stream, since the HttpStreamRequest may have modified the configuration | 79 // stream, since the HttpStreamRequest may have modified the configuration |
| 79 // during stream processing. | 80 // during stream processing. |
| 80 // |used_proxy_info| indicates the actual ProxyInfo used for this stream, | 81 // |used_proxy_info| indicates the actual ProxyInfo used for this stream, |
| 81 // since the HttpStreamRequest performs the proxy resolution. | 82 // since the HttpStreamRequest performs the proxy resolution. |
| 82 virtual void OnWebSocketHandshakeStreamReady( | 83 virtual void OnWebSocketHandshakeStreamReady( |
| 83 const SSLConfig& used_ssl_config, | 84 const SSLConfig& used_ssl_config, |
| 84 const ProxyInfo& used_proxy_info, | 85 const ProxyInfo& used_proxy_info, |
| 85 WebSocketHandshakeStreamBase* stream) = 0; | 86 WebSocketHandshakeStreamBase* stream) = 0; |
| 86 | 87 |
| 88 virtual void OnBidirectionalStreamJobReady( |
| 89 const SSLConfig& used_ssl_config, |
| 90 const ProxyInfo& used_proxy_info, |
| 91 BidirectionalStreamJob* stream) = 0; |
| 92 |
| 87 // This is the failure to create a stream case. | 93 // This is the failure to create a stream case. |
| 88 // |used_ssl_config| indicates the actual SSL configuration used for this | 94 // |used_ssl_config| indicates the actual SSL configuration used for this |
| 89 // stream, since the HttpStreamRequest may have modified the configuration | 95 // stream, since the HttpStreamRequest may have modified the configuration |
| 90 // during stream processing. If an SSL handshake failed, |ssl_failure_state| | 96 // during stream processing. If an SSL handshake failed, |ssl_failure_state| |
| 91 // is the state the SSLClientSocket was in. | 97 // is the state the SSLClientSocket was in. |
| 92 virtual void OnStreamFailed(int status, | 98 virtual void OnStreamFailed(int status, |
| 93 const SSLConfig& used_ssl_config, | 99 const SSLConfig& used_ssl_config, |
| 94 SSLFailureState ssl_failure_state) = 0; | 100 SSLFailureState ssl_failure_state) = 0; |
| 95 | 101 |
| 96 // Called when we have a certificate error for the request. | 102 // Called when we have a certificate error for the request. |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 // completion. | 225 // completion. |
| 220 virtual HttpStreamRequest* RequestWebSocketHandshakeStream( | 226 virtual HttpStreamRequest* RequestWebSocketHandshakeStream( |
| 221 const HttpRequestInfo& info, | 227 const HttpRequestInfo& info, |
| 222 RequestPriority priority, | 228 RequestPriority priority, |
| 223 const SSLConfig& server_ssl_config, | 229 const SSLConfig& server_ssl_config, |
| 224 const SSLConfig& proxy_ssl_config, | 230 const SSLConfig& proxy_ssl_config, |
| 225 HttpStreamRequest::Delegate* delegate, | 231 HttpStreamRequest::Delegate* delegate, |
| 226 WebSocketHandshakeStreamBase::CreateHelper* create_helper, | 232 WebSocketHandshakeStreamBase::CreateHelper* create_helper, |
| 227 const BoundNetLog& net_log) = 0; | 233 const BoundNetLog& net_log) = 0; |
| 228 | 234 |
| 235 // Request a BidirectionalStreamJob. |
| 236 // Will call delegate->OnBidirectionalStreamJobReady on successful |
| 237 // completion. |
| 238 virtual HttpStreamRequest* RequestBidirectionalStreamJob( |
| 239 const HttpRequestInfo& info, |
| 240 RequestPriority priority, |
| 241 const SSLConfig& server_ssl_config, |
| 242 const SSLConfig& proxy_ssl_config, |
| 243 HttpStreamRequest::Delegate* delegate, |
| 244 const BoundNetLog& net_log) = 0; |
| 245 |
| 229 // Requests that enough connections for |num_streams| be opened. | 246 // Requests that enough connections for |num_streams| be opened. |
| 230 virtual void PreconnectStreams(int num_streams, | 247 virtual void PreconnectStreams(int num_streams, |
| 231 const HttpRequestInfo& info, | 248 const HttpRequestInfo& info, |
| 232 const SSLConfig& server_ssl_config, | 249 const SSLConfig& server_ssl_config, |
| 233 const SSLConfig& proxy_ssl_config) = 0; | 250 const SSLConfig& proxy_ssl_config) = 0; |
| 234 | 251 |
| 235 virtual const HostMappingRules* GetHostMappingRules() const = 0; | 252 virtual const HostMappingRules* GetHostMappingRules() const = 0; |
| 236 | 253 |
| 237 // Static settings | 254 // Static settings |
| 238 | 255 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 254 static bool spdy_enabled_; | 271 static bool spdy_enabled_; |
| 255 | 272 |
| 256 HostPortPair RewriteHost(HostPortPair host_port_pair); | 273 HostPortPair RewriteHost(HostPortPair host_port_pair); |
| 257 | 274 |
| 258 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); | 275 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); |
| 259 }; | 276 }; |
| 260 | 277 |
| 261 } // namespace net | 278 } // namespace net |
| 262 | 279 |
| 263 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ | 280 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ |
| OLD | NEW |