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_SPDY_SPDY_HTTP_STREAM_H_ | 5 #ifndef NET_SPDY_SPDY_HTTP_STREAM_H_ |
6 #define NET_SPDY_SPDY_HTTP_STREAM_H_ | 6 #define NET_SPDY_SPDY_HTTP_STREAM_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 bool IsSpdyHttpStream() const override; | 72 bool IsSpdyHttpStream() const override; |
73 void Drain(HttpNetworkSession* session) override; | 73 void Drain(HttpNetworkSession* session) override; |
74 void SetPriority(RequestPriority priority) override; | 74 void SetPriority(RequestPriority priority) override; |
75 | 75 |
76 // SpdyStream::Delegate implementation. | 76 // SpdyStream::Delegate implementation. |
77 void OnRequestHeadersSent() override; | 77 void OnRequestHeadersSent() override; |
78 SpdyResponseHeadersStatus OnResponseHeadersUpdated( | 78 SpdyResponseHeadersStatus OnResponseHeadersUpdated( |
79 const SpdyHeaderBlock& response_headers) override; | 79 const SpdyHeaderBlock& response_headers) override; |
80 void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override; | 80 void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override; |
81 void OnDataSent() override; | 81 void OnDataSent() override; |
| 82 void OnTrailers(const SpdyHeaderBlock& trailers) override; |
82 void OnClose(int status) override; | 83 void OnClose(int status) override; |
83 | 84 |
84 private: | 85 private: |
85 // Must be called only when |request_info_| is non-NULL. | 86 // Must be called only when |request_info_| is non-NULL. |
86 bool HasUploadData() const; | 87 bool HasUploadData() const; |
87 | 88 |
88 void OnStreamCreated(const CompletionCallback& callback, int rv); | 89 void OnStreamCreated(const CompletionCallback& callback, int rv); |
89 | 90 |
90 // Reads the remaining data (whether chunked or not) from the | 91 // Reads the remaining data (whether chunked or not) from the |
91 // request body stream and sends it if there's any. The read and | 92 // request body stream and sends it if there's any. The read and |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 bool direct_; | 158 bool direct_; |
158 | 159 |
159 base::WeakPtrFactory<SpdyHttpStream> weak_factory_; | 160 base::WeakPtrFactory<SpdyHttpStream> weak_factory_; |
160 | 161 |
161 DISALLOW_COPY_AND_ASSIGN(SpdyHttpStream); | 162 DISALLOW_COPY_AND_ASSIGN(SpdyHttpStream); |
162 }; | 163 }; |
163 | 164 |
164 } // namespace net | 165 } // namespace net |
165 | 166 |
166 #endif // NET_SPDY_SPDY_HTTP_STREAM_H_ | 167 #endif // NET_SPDY_SPDY_HTTP_STREAM_H_ |
OLD | NEW |