| 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_HOST_H_ | 5 #ifndef NET_HTTP_HTTP_PIPELINED_HOST_H_ |
| 6 #define NET_HTTP_HTTP_PIPELINED_HOST_H_ | 6 #define NET_HTTP_HTTP_PIPELINED_HOST_H_ |
| 7 | 7 |
| 8 #include "net/base/host_port_pair.h" | 8 #include "net/base/host_port_pair.h" |
| 9 #include "net/base/net_export.h" | 9 #include "net/base/net_export.h" |
| 10 #include "net/http/http_pipelined_connection.h" | 10 #include "net/http/http_pipelined_connection.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 virtual void OnHostIdle(HttpPipelinedHost* host) = 0; | 48 virtual void OnHostIdle(HttpPipelinedHost* host) = 0; |
| 49 | 49 |
| 50 // Called when a pipelined host has newly available pipeline capacity, like | 50 // Called when a pipelined host has newly available pipeline capacity, like |
| 51 // when a request completes. | 51 // when a request completes. |
| 52 virtual void OnHostHasAdditionalCapacity(HttpPipelinedHost* host) = 0; | 52 virtual void OnHostHasAdditionalCapacity(HttpPipelinedHost* host) = 0; |
| 53 | 53 |
| 54 // Called when a host determines if pipelining can be used. | 54 // Called when a host determines if pipelining can be used. |
| 55 virtual void OnHostDeterminedCapability( | 55 virtual void OnHostDeterminedCapability( |
| 56 HttpPipelinedHost* host, | 56 HttpPipelinedHost* host, |
| 57 HttpPipelinedHostCapability capability) = 0; | 57 HttpPipelinedHostCapability capability) = 0; |
| 58 |
| 59 protected: |
| 60 virtual ~Delegate() {} |
| 58 }; | 61 }; |
| 59 | 62 |
| 60 class Factory { | 63 class Factory { |
| 61 public: | 64 public: |
| 62 virtual ~Factory() {} | 65 virtual ~Factory() {} |
| 63 | 66 |
| 64 // Returns a new HttpPipelinedHost. | 67 // Returns a new HttpPipelinedHost. |
| 65 virtual HttpPipelinedHost* CreateNewHost( | 68 virtual HttpPipelinedHost* CreateNewHost( |
| 66 Delegate* delegate, const Key& key, | 69 Delegate* delegate, const Key& key, |
| 67 HttpPipelinedConnection::Factory* factory, | 70 HttpPipelinedConnection::Factory* factory, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 93 virtual const Key& GetKey() const = 0; | 96 virtual const Key& GetKey() const = 0; |
| 94 | 97 |
| 95 // Creates a Value summary of this host's pipelines. Caller assumes | 98 // Creates a Value summary of this host's pipelines. Caller assumes |
| 96 // ownership of the returned Value. | 99 // ownership of the returned Value. |
| 97 virtual base::Value* PipelineInfoToValue() const = 0; | 100 virtual base::Value* PipelineInfoToValue() const = 0; |
| 98 }; | 101 }; |
| 99 | 102 |
| 100 } // namespace net | 103 } // namespace net |
| 101 | 104 |
| 102 #endif // NET_HTTP_HTTP_PIPELINED_HOST_H_ | 105 #endif // NET_HTTP_HTTP_PIPELINED_HOST_H_ |
| OLD | NEW |