Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2181)

Unified Diff: net/http/http_stream_factory.h

Issue 14813024: Introduce RequestWebSocketStream into HttpStreamFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_network_transaction.cc ('k') | net/http/http_stream_factory_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory.h
diff --git a/net/http/http_stream_factory.h b/net/http/http_stream_factory.h
index 4d8afacbfa54ce5d4774cc5c55486ccf1fde6aa3..0af39db7b449c724510e733108e553325f6f3195 100644
--- a/net/http/http_stream_factory.h
+++ b/net/http/http_stream_factory.h
@@ -18,6 +18,10 @@
#include "net/base/request_priority.h"
#include "net/http/http_server_properties.h"
#include "net/socket/ssl_client_socket.h"
+// This file can be included from net/http even though
+// it is in net/websockets because it doesn't
+// introduce any link dependency to net/websockets.
+#include "net/websockets/websocket_stream_base.h"
class GURL;
@@ -55,7 +59,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 +71,18 @@ class NET_EXPORT_PRIVATE HttpStreamRequest {
const ProxyInfo& used_proxy_info,
HttpStreamBase* stream) = 0;
+ // This is the success case for RequestWebSocketStream.
+ // |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
+ // during stream processing.
+ // |used_proxy_info| indicates the actual ProxyInfo used for this stream,
+ // since the HttpStreamRequest performs the proxy resolution.
+ virtual void OnWebSocketStreamReady(
+ const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ WebSocketStreamBase* stream) = 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 +185,7 @@ class NET_EXPORT HttpStreamFactory {
// Virtual interface methods.
// Request a stream.
- // Will callback to the HttpStreamRequestDelegate upon completion.
+ // Will call delegate->OnStreamReady on successful completion.
virtual HttpStreamRequest* RequestStream(
const HttpRequestInfo& info,
RequestPriority priority,
@@ -178,6 +194,17 @@ class NET_EXPORT HttpStreamFactory {
HttpStreamRequest::Delegate* delegate,
const BoundNetLog& net_log) = 0;
+ // Request a WebSocket stream.
+ // Will call delegate->OnWebSocketStreamReady on successful completion.
+ virtual HttpStreamRequest* RequestWebSocketStream(
+ const HttpRequestInfo& info,
+ RequestPriority priority,
+ const SSLConfig& server_ssl_config,
+ const SSLConfig& proxy_ssl_config,
+ HttpStreamRequest::Delegate* delegate,
+ WebSocketStreamBase::Factory* factory,
+ const BoundNetLog& net_log) = 0;
+
// Requests that enough connections for |num_streams| be opened.
virtual void PreconnectStreams(int num_streams,
const HttpRequestInfo& info,
« no previous file with comments | « net/http/http_network_transaction.cc ('k') | net/http/http_stream_factory_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698