OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 COMPONENTS_CRONET_IOS_CRONET_BIDIRECTIONAL_STREAM_H_ | 5 #ifndef COMPONENTS_CRONET_IOS_CRONET_BIDIRECTIONAL_STREAM_H_ |
6 #define COMPONENTS_CRONET_IOS_CRONET_BIDIRECTIONAL_STREAM_H_ | 6 #define COMPONENTS_CRONET_IOS_CRONET_BIDIRECTIONAL_STREAM_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/weak_ptr.h" |
13 #include "base/synchronization/lock.h" | 14 #include "base/synchronization/lock.h" |
14 #include "net/http/bidirectional_stream.h" | 15 #include "net/http/bidirectional_stream.h" |
15 | 16 |
16 namespace net { | 17 namespace net { |
17 class HttpRequestHeaders; | 18 class HttpRequestHeaders; |
18 class WrappedIOBuffer; | 19 class WrappedIOBuffer; |
19 } // namespace net | 20 } // namespace net |
20 | 21 |
21 namespace cronet { | 22 namespace cronet { |
22 | 23 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 // Write data that is pending the flush. | 214 // Write data that is pending the flush. |
214 std::unique_ptr<WriteBuffers> pending_write_data_; | 215 std::unique_ptr<WriteBuffers> pending_write_data_; |
215 // Write data that is flushed, but not sending yet. | 216 // Write data that is flushed, but not sending yet. |
216 std::unique_ptr<WriteBuffers> flushing_write_data_; | 217 std::unique_ptr<WriteBuffers> flushing_write_data_; |
217 // Write data that is sending. | 218 // Write data that is sending. |
218 std::unique_ptr<WriteBuffers> sending_write_data_; | 219 std::unique_ptr<WriteBuffers> sending_write_data_; |
219 | 220 |
220 std::unique_ptr<net::BidirectionalStream> bidi_stream_; | 221 std::unique_ptr<net::BidirectionalStream> bidi_stream_; |
221 Delegate* delegate_; | 222 Delegate* delegate_; |
222 | 223 |
| 224 base::WeakPtr<CronetBidirectionalStream> weak_this_; |
| 225 base::WeakPtrFactory<CronetBidirectionalStream> weak_factory_; |
| 226 |
223 DISALLOW_COPY_AND_ASSIGN(CronetBidirectionalStream); | 227 DISALLOW_COPY_AND_ASSIGN(CronetBidirectionalStream); |
224 }; | 228 }; |
225 | 229 |
226 } // namespace cronet | 230 } // namespace cronet |
227 | 231 |
228 #endif // COMPONENTS_CRONET_IOS_CRONET_BIDIRECTIONAL_STREAM_H_ | 232 #endif // COMPONENTS_CRONET_IOS_CRONET_BIDIRECTIONAL_STREAM_H_ |
OLD | NEW |