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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 struct HttpRequestInfo; | 47 struct HttpRequestInfo; |
48 struct SSLConfig; | 48 struct SSLConfig; |
49 | 49 |
50 // The HttpStreamRequest is the client's handle to the worker object which | 50 // The HttpStreamRequest is the client's handle to the worker object which |
51 // handles the creation of an HttpStream. While the HttpStream is being | 51 // handles the creation of an HttpStream. While the HttpStream is being |
52 // created, this object is the creator's handle for interacting with the | 52 // created, this object is the creator's handle for interacting with the |
53 // HttpStream creation process. The request is cancelled by deleting it, after | 53 // HttpStream creation process. The request is cancelled by deleting it, after |
54 // which no callbacks will be invoked. | 54 // which no callbacks will be invoked. |
55 class NET_EXPORT_PRIVATE HttpStreamRequest { | 55 class NET_EXPORT_PRIVATE HttpStreamRequest { |
56 public: | 56 public: |
57 // Indicates which type of stream is requested. | |
58 enum StreamType { | |
59 BIDIRECTIONAL_STREAM, | |
60 HTTP_STREAM, | |
61 }; | |
62 | |
63 // The HttpStreamRequest::Delegate is a set of callback methods for a | 57 // The HttpStreamRequest::Delegate is a set of callback methods for a |
64 // HttpStreamRequestJob. Generally, only one of these methods will be | 58 // HttpStreamRequestJob. Generally, only one of these methods will be |
65 // called as a result of a stream request. | 59 // called as a result of a stream request. |
66 class NET_EXPORT_PRIVATE Delegate { | 60 class NET_EXPORT_PRIVATE Delegate { |
67 public: | 61 public: |
68 virtual ~Delegate() {} | 62 virtual ~Delegate() {} |
69 | 63 |
70 // This is the success case for RequestStream. | 64 // This is the success case for RequestStream. |
71 // |stream| is now owned by the delegate. | 65 // |stream| is now owned by the delegate. |
72 // |used_ssl_config| indicates the actual SSL configuration used for this | 66 // |used_ssl_config| indicates the actual SSL configuration used for this |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 static bool spdy_enabled_; | 271 static bool spdy_enabled_; |
278 | 272 |
279 HostPortPair RewriteHost(HostPortPair host_port_pair); | 273 HostPortPair RewriteHost(HostPortPair host_port_pair); |
280 | 274 |
281 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); | 275 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); |
282 }; | 276 }; |
283 | 277 |
284 } // namespace net | 278 } // namespace net |
285 | 279 |
286 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ | 280 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ |
OLD | NEW |