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_PIPELINED_CONNECTION_H_ | 5 #ifndef NET_HTTP_HTTP_PIPELINED_CONNECTION_H_ |
6 #define NET_HTTP_HTTP_PIPELINED_CONNECTION_H_ | 6 #define NET_HTTP_HTTP_PIPELINED_CONNECTION_H_ |
7 | 7 |
8 #include "net/base/net_export.h" | 8 #include "net/base/net_export.h" |
9 #include "net/base/net_log.h" | 9 #include "net/base/net_log.h" |
10 #include "net/socket/ssl_client_socket.h" | 10 #include "net/socket/ssl_client_socket.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 public: | 32 public: |
33 // Called when a pipeline has newly available capacity. This may be because | 33 // Called when a pipeline has newly available capacity. This may be because |
34 // the first request has been sent and the pipeline is now active. Or, it | 34 // the first request has been sent and the pipeline is now active. Or, it |
35 // may be because a request successfully completed. | 35 // may be because a request successfully completed. |
36 virtual void OnPipelineHasCapacity(HttpPipelinedConnection* pipeline) = 0; | 36 virtual void OnPipelineHasCapacity(HttpPipelinedConnection* pipeline) = 0; |
37 | 37 |
38 // Called every time a pipeline receives headers. Lets the delegate know if | 38 // Called every time a pipeline receives headers. Lets the delegate know if |
39 // the headers indicate that pipelining can be used. | 39 // the headers indicate that pipelining can be used. |
40 virtual void OnPipelineFeedback(HttpPipelinedConnection* pipeline, | 40 virtual void OnPipelineFeedback(HttpPipelinedConnection* pipeline, |
41 Feedback feedback) = 0; | 41 Feedback feedback) = 0; |
| 42 |
| 43 protected: |
| 44 virtual ~Delegate() {} |
42 }; | 45 }; |
43 | 46 |
44 class Factory { | 47 class Factory { |
45 public: | 48 public: |
46 virtual ~Factory() {} | 49 virtual ~Factory() {} |
47 | 50 |
48 virtual HttpPipelinedConnection* CreateNewPipeline( | 51 virtual HttpPipelinedConnection* CreateNewPipeline( |
49 ClientSocketHandle* connection, | 52 ClientSocketHandle* connection, |
50 Delegate* delegate, | 53 Delegate* delegate, |
51 const HostPortPair& origin, | 54 const HostPortPair& origin, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // True if this connection was NPN negotiated. | 87 // True if this connection was NPN negotiated. |
85 virtual bool was_npn_negotiated() const = 0; | 88 virtual bool was_npn_negotiated() const = 0; |
86 | 89 |
87 // Protocol negotiated with the server. | 90 // Protocol negotiated with the server. |
88 virtual NextProto protocol_negotiated() const = 0; | 91 virtual NextProto protocol_negotiated() const = 0; |
89 }; | 92 }; |
90 | 93 |
91 } // namespace net | 94 } // namespace net |
92 | 95 |
93 #endif // NET_HTTP_HTTP_PIPELINED_CONNECTION_H_ | 96 #endif // NET_HTTP_HTTP_PIPELINED_CONNECTION_H_ |
OLD | NEW |