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" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "net/base/completion_callback.h" | 13 #include "net/base/completion_callback.h" |
14 #include "net/base/net_log.h" | 14 #include "net/base/net_log.h" |
15 #include "net/http/http_stream.h" | 15 #include "net/http/http_stream.h" |
16 #include "net/spdy/spdy_read_queue.h" | 16 #include "net/spdy/spdy_read_queue.h" |
| 17 #include "net/spdy/spdy_session.h" |
17 #include "net/spdy/spdy_stream.h" | 18 #include "net/spdy/spdy_stream.h" |
18 | 19 |
19 namespace net { | 20 namespace net { |
20 | 21 |
21 class DrainableIOBuffer; | 22 class DrainableIOBuffer; |
22 struct HttpRequestInfo; | 23 struct HttpRequestInfo; |
23 class HttpResponseInfo; | 24 class HttpResponseInfo; |
24 class IOBuffer; | 25 class IOBuffer; |
25 class SpdySession; | 26 class SpdySession; |
26 class UploadDataStream; | 27 class UploadDataStream; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 virtual bool IsConnectionReusable() const OVERRIDE; | 78 virtual bool IsConnectionReusable() const OVERRIDE; |
78 virtual bool GetLoadTimingInfo( | 79 virtual bool GetLoadTimingInfo( |
79 LoadTimingInfo* load_timing_info) const OVERRIDE; | 80 LoadTimingInfo* load_timing_info) const OVERRIDE; |
80 virtual void GetSSLInfo(SSLInfo* ssl_info) OVERRIDE; | 81 virtual void GetSSLInfo(SSLInfo* ssl_info) OVERRIDE; |
81 virtual void GetSSLCertRequestInfo( | 82 virtual void GetSSLCertRequestInfo( |
82 SSLCertRequestInfo* cert_request_info) OVERRIDE; | 83 SSLCertRequestInfo* cert_request_info) OVERRIDE; |
83 virtual bool IsSpdyHttpStream() const OVERRIDE; | 84 virtual bool IsSpdyHttpStream() const OVERRIDE; |
84 virtual void Drain(HttpNetworkSession* session) OVERRIDE; | 85 virtual void Drain(HttpNetworkSession* session) OVERRIDE; |
85 | 86 |
86 // SpdyStream::Delegate implementation. | 87 // SpdyStream::Delegate implementation. |
87 virtual SpdySendStatus OnSendRequestHeadersComplete() OVERRIDE; | 88 virtual void OnSendRequestHeadersComplete() OVERRIDE; |
88 virtual void OnSendBody() OVERRIDE; | 89 virtual void OnSendBody() OVERRIDE; |
89 virtual void OnSendBodyComplete() OVERRIDE; | 90 virtual void OnSendBodyComplete() OVERRIDE; |
90 virtual int OnResponseReceived(const SpdyHeaderBlock& response, | 91 virtual int OnResponseReceived(const SpdyHeaderBlock& response, |
91 base::Time response_time, | 92 base::Time response_time, |
92 int status) OVERRIDE; | 93 int status) OVERRIDE; |
93 virtual int OnDataReceived(scoped_ptr<SpdyBuffer> buffer) OVERRIDE; | 94 virtual int OnDataReceived(scoped_ptr<SpdyBuffer> buffer) OVERRIDE; |
94 virtual void OnDataSent() OVERRIDE; | 95 virtual void OnDataSent() OVERRIDE; |
95 virtual void OnClose(int status) OVERRIDE; | 96 virtual void OnClose(int status) OVERRIDE; |
96 | 97 |
97 private: | 98 private: |
(...skipping 22 matching lines...) Expand all Loading... |
120 | 121 |
121 base::WeakPtrFactory<SpdyHttpStream> weak_factory_; | 122 base::WeakPtrFactory<SpdyHttpStream> weak_factory_; |
122 | 123 |
123 const scoped_refptr<SpdySession> spdy_session_; | 124 const scoped_refptr<SpdySession> spdy_session_; |
124 SpdyStreamRequest stream_request_; | 125 SpdyStreamRequest stream_request_; |
125 base::WeakPtr<SpdyStream> stream_; | 126 base::WeakPtr<SpdyStream> stream_; |
126 | 127 |
127 bool stream_closed_; | 128 bool stream_closed_; |
128 | 129 |
129 // Set only when |stream_closed_| is true. | 130 // Set only when |stream_closed_| is true. |
130 bool closed_stream_pushed_; | |
131 int closed_stream_status_; | 131 int closed_stream_status_; |
132 SpdyStreamId closed_stream_id_; | 132 SpdyStreamId closed_stream_id_; |
133 | 133 |
134 // The request to send. | 134 // The request to send. |
135 const HttpRequestInfo* request_info_; | 135 const HttpRequestInfo* request_info_; |
136 | 136 |
137 bool has_upload_data_; | 137 bool has_upload_data_; |
138 | 138 |
139 // |response_info_| is the HTTP response data object which is filled in | 139 // |response_info_| is the HTTP response data object which is filled in |
140 // when a SYN_REPLY comes in for the stream. | 140 // when a SYN_REPLY comes in for the stream. |
(...skipping 25 matching lines...) Expand all Loading... |
166 | 166 |
167 // Is this spdy stream direct to the origin server (or to a proxy). | 167 // Is this spdy stream direct to the origin server (or to a proxy). |
168 bool direct_; | 168 bool direct_; |
169 | 169 |
170 DISALLOW_COPY_AND_ASSIGN(SpdyHttpStream); | 170 DISALLOW_COPY_AND_ASSIGN(SpdyHttpStream); |
171 }; | 171 }; |
172 | 172 |
173 } // namespace net | 173 } // namespace net |
174 | 174 |
175 #endif // NET_SPDY_SPDY_HTTP_STREAM_H_ | 175 #endif // NET_SPDY_SPDY_HTTP_STREAM_H_ |
OLD | NEW |