| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BIDIRECTIONAL_STREAM_IMPL_H_ | 5 #ifndef NET_HTTP_BIDIRECTIONAL_STREAM_IMPL_H_ |
| 6 #define NET_HTTP_BIDIRECTIONAL_STREAM_IMPL_H_ | 6 #define NET_HTTP_BIDIRECTIONAL_STREAM_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 // The delegate should not call BidirectionalStreamImpl::Cancel | 67 // The delegate should not call BidirectionalStreamImpl::Cancel |
| 68 // during this callback. | 68 // during this callback. |
| 69 virtual void OnDataSent() = 0; | 69 virtual void OnDataSent() = 0; |
| 70 | 70 |
| 71 // Called when trailers are received. This is called as soon as trailers | 71 // Called when trailers are received. This is called as soon as trailers |
| 72 // are received, which can happen before a read completes. | 72 // are received, which can happen before a read completes. |
| 73 // The delegate is able to continue reading if there is no pending read and | 73 // The delegate is able to continue reading if there is no pending read and |
| 74 // EOF has not been received, or to send data if there is no pending send. | 74 // EOF has not been received, or to send data if there is no pending send. |
| 75 virtual void OnTrailersReceived(const SpdyHeaderBlock& trailers) = 0; | 75 virtual void OnTrailersReceived(const SpdyHeaderBlock& trailers) = 0; |
| 76 | 76 |
| 77 // Called when an error occurred. | 77 // Called when an error occurred. Do not call into the stream after this |
| 78 // No other delegate functions will be called after this. | 78 // point. No other delegate functions will be called after this. |
| 79 virtual void OnFailed(int status) = 0; | 79 virtual void OnFailed(int status) = 0; |
| 80 | 80 |
| 81 protected: | 81 protected: |
| 82 virtual ~Delegate(); | 82 virtual ~Delegate(); |
| 83 | 83 |
| 84 private: | 84 private: |
| 85 DISALLOW_COPY_AND_ASSIGN(Delegate); | 85 DISALLOW_COPY_AND_ASSIGN(Delegate); |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 BidirectionalStreamImpl(); | 88 BidirectionalStreamImpl(); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 // not associated with any stream, and are not included in this value. | 153 // not associated with any stream, and are not included in this value. |
| 154 virtual int64_t GetTotalSentBytes() const = 0; | 154 virtual int64_t GetTotalSentBytes() const = 0; |
| 155 | 155 |
| 156 private: | 156 private: |
| 157 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamImpl); | 157 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamImpl); |
| 158 }; | 158 }; |
| 159 | 159 |
| 160 } // namespace net | 160 } // namespace net |
| 161 | 161 |
| 162 #endif // NET_HTTP_BIDIRECTIONAL_STREAM_IMPL_H_ | 162 #endif // NET_HTTP_BIDIRECTIONAL_STREAM_IMPL_H_ |
| OLD | NEW |