Chromium Code Reviews| Index: net/http/http_stream_factory.h |
| diff --git a/net/http/http_stream_factory.h b/net/http/http_stream_factory.h |
| index eaadcc724e30a88f1d453bc9d648d231dea191d1..a0b85073147e3024f58f15a0defc954b2e1a14e4 100644 |
| --- a/net/http/http_stream_factory.h |
| +++ b/net/http/http_stream_factory.h |
| @@ -29,6 +29,7 @@ namespace net { |
| class AuthCredentials; |
| class BoundNetLog; |
| +class ClientSocketHandle; |
| class HostMappingRules; |
| class HostPortPair; |
| class HttpAuthController; |
| @@ -38,6 +39,7 @@ class HttpStreamBase; |
| class ProxyInfo; |
| class SSLCertRequestInfo; |
| class SSLInfo; |
| +class SpdySession; |
| struct HttpRequestInfo; |
| struct SSLConfig; |
| @@ -55,7 +57,7 @@ class NET_EXPORT_PRIVATE HttpStreamRequest { |
| public: |
| virtual ~Delegate() {} |
| - // This is the success case. |
| + // This is the success case for RequestStream. |
| // |stream| is now owned by the delegate. |
| // |used_ssl_config| indicates the actual SSL configuration used for this |
| // stream, since the HttpStreamRequest may have modified the configuration |
| @@ -67,6 +69,31 @@ class NET_EXPORT_PRIVATE HttpStreamRequest { |
| const ProxyInfo& used_proxy_info, |
| HttpStreamBase* stream) = 0; |
| + // This is a success case for RequestStreamForWebSocket. |
| + // |connection| is now owned by the delegate. |
| + // |used_ssl_config| indicates the actual SSL configuration used for this |
| + // stream, since the HttpStreamRequest may have modified the configuration |
| + // during stream processing. |
| + // |used_proxy_info| indicates the actual ProxyInfo used for this stream, |
| + // since the HttpStreamRequest performs the proxy resolution. |
| + virtual void OnSocketReadyForWebSocket( |
| + const SSLConfig& used_ssl_config, |
| + const ProxyInfo& used_proxy_info, |
| + ClientSocketHandle* connection) = 0; |
| + |
| + // This is a success case for RequestStreamForWebSocket. |
| + // |session| is referenced by the caller. |
| + // You should create and hold a scoped_refptr to retain it. |
| + // |used_ssl_config| indicates the actual SSL configuration used for this |
| + // stream, since the HttpStreamRequest may have modified the configuration |
| + // during stream processing. |
| + // |used_proxy_info| indicates the actual ProxyInfo used for this stream, |
| + // since the HttpStreamRequest performs the proxy resolution. |
| + virtual void OnSpdySessionReadyForWebSocket( |
| + const SSLConfig& used_ssl_config, |
| + const ProxyInfo& used_proxy_info, |
| + SpdySession* session) = 0; |
| + |
| // This is the failure to create a stream case. |
| // |used_ssl_config| indicates the actual SSL configuration used for this |
| // stream, since the HttpStreamRequest may have modified the configuration |
| @@ -169,7 +196,7 @@ class NET_EXPORT HttpStreamFactory { |
| // Virtual interface methods. |
| // Request a stream. |
| - // Will callback to the HttpStreamRequestDelegate upon completion. |
| + // Will call delegate->OnStreamReady upon completion. |
| virtual HttpStreamRequest* RequestStream( |
| const HttpRequestInfo& info, |
| RequestPriority priority, |
| @@ -178,6 +205,17 @@ class NET_EXPORT HttpStreamFactory { |
| HttpStreamRequest::Delegate* delegate, |
| const BoundNetLog& net_log) = 0; |
| + // Request a stream for a websocket connection. |
|
mmenke
2013/05/23 20:26:20
We're not actually requesting an HttpStream, but r
Adam Rice
2013/05/24 03:41:09
iOS Chrome compiles libnet without WebSocket suppo
yhirano
2013/05/24 14:11:16
I talked with Adam and we agreed to add WebSocketS
|
| + // Will call delegate->OnSocketReadyForWebSocket or |
| + // delegate->OnSpdySessionReadyForWebSocket upon completion. |
| + virtual HttpStreamRequest* RequestStreamForWebSocket( |
| + const HttpRequestInfo& info, |
| + RequestPriority priority, |
| + const SSLConfig& server_ssl_config, |
| + const SSLConfig& proxy_ssl_config, |
| + HttpStreamRequest::Delegate* delegate, |
| + const BoundNetLog& net_log) = 0; |
| + |
| // Requests that enough connections for |num_streams| be opened. |
| virtual void PreconnectStreams(int num_streams, |
| const HttpRequestInfo& info, |