| 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 BidirectionalStream; |
| 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 OnBidirectionalStreamReady(const SSLConfig& used_ssl_config, |
| 89 const ProxyInfo& used_proxy_info, |
| 90 BidirectionalStream* stream) = 0; |
| 91 |
| 87 // This is the failure to create a stream case. | 92 // This is the failure to create a stream case. |
| 88 // |used_ssl_config| indicates the actual SSL configuration used for this | 93 // |used_ssl_config| indicates the actual SSL configuration used for this |
| 89 // stream, since the HttpStreamRequest may have modified the configuration | 94 // stream, since the HttpStreamRequest may have modified the configuration |
| 90 // during stream processing. If an SSL handshake failed, |ssl_failure_state| | 95 // during stream processing. If an SSL handshake failed, |ssl_failure_state| |
| 91 // is the state the SSLClientSocket was in. | 96 // is the state the SSLClientSocket was in. |
| 92 virtual void OnStreamFailed(int status, | 97 virtual void OnStreamFailed(int status, |
| 93 const SSLConfig& used_ssl_config, | 98 const SSLConfig& used_ssl_config, |
| 94 SSLFailureState ssl_failure_state) = 0; | 99 SSLFailureState ssl_failure_state) = 0; |
| 95 | 100 |
| 96 // Called when we have a certificate error for the request. | 101 // Called when we have a certificate error for the request. |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 // completion. | 220 // completion. |
| 216 virtual HttpStreamRequest* RequestWebSocketHandshakeStream( | 221 virtual HttpStreamRequest* RequestWebSocketHandshakeStream( |
| 217 const HttpRequestInfo& info, | 222 const HttpRequestInfo& info, |
| 218 RequestPriority priority, | 223 RequestPriority priority, |
| 219 const SSLConfig& server_ssl_config, | 224 const SSLConfig& server_ssl_config, |
| 220 const SSLConfig& proxy_ssl_config, | 225 const SSLConfig& proxy_ssl_config, |
| 221 HttpStreamRequest::Delegate* delegate, | 226 HttpStreamRequest::Delegate* delegate, |
| 222 WebSocketHandshakeStreamBase::CreateHelper* create_helper, | 227 WebSocketHandshakeStreamBase::CreateHelper* create_helper, |
| 223 const BoundNetLog& net_log) = 0; | 228 const BoundNetLog& net_log) = 0; |
| 224 | 229 |
| 230 // Will call delegate->OnBidirectionalStreamReady on successful |
| 231 // completion. |
| 232 virtual HttpStreamRequest* RequestBidirectionalStream( |
| 233 const HttpRequestInfo& info, |
| 234 RequestPriority priority, |
| 235 const SSLConfig& server_ssl_config, |
| 236 const SSLConfig& proxy_ssl_config, |
| 237 HttpStreamRequest::Delegate* delegate, |
| 238 const BoundNetLog& net_log) = 0; |
| 239 |
| 225 // Requests that enough connections for |num_streams| be opened. | 240 // Requests that enough connections for |num_streams| be opened. |
| 226 virtual void PreconnectStreams(int num_streams, | 241 virtual void PreconnectStreams(int num_streams, |
| 227 const HttpRequestInfo& info, | 242 const HttpRequestInfo& info, |
| 228 const SSLConfig& server_ssl_config, | 243 const SSLConfig& server_ssl_config, |
| 229 const SSLConfig& proxy_ssl_config) = 0; | 244 const SSLConfig& proxy_ssl_config) = 0; |
| 230 | 245 |
| 231 virtual const HostMappingRules* GetHostMappingRules() const = 0; | 246 virtual const HostMappingRules* GetHostMappingRules() const = 0; |
| 232 | 247 |
| 233 // Static settings | 248 // Static settings |
| 234 | 249 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 250 static bool spdy_enabled_; | 265 static bool spdy_enabled_; |
| 251 | 266 |
| 252 HostPortPair RewriteHost(HostPortPair host_port_pair); | 267 HostPortPair RewriteHost(HostPortPair host_port_pair); |
| 253 | 268 |
| 254 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); | 269 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); |
| 255 }; | 270 }; |
| 256 | 271 |
| 257 } // namespace net | 272 } // namespace net |
| 258 | 273 |
| 259 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ | 274 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ |
| OLD | NEW |