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_GRPC_SUPPORT_BIDIRECTIONAL_STREAM_H_ | 5 #ifndef COMPONENTS_GRPC_SUPPORT_BIDIRECTIONAL_STREAM_H_ |
6 #define COMPONENTS_GRPC_SUPPORT_BIDIRECTIONAL_STREAM_H_ | 6 #define COMPONENTS_GRPC_SUPPORT_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/memory/weak_ptr.h" |
14 #include "base/synchronization/lock.h" | 14 #include "base/synchronization/lock.h" |
15 #include "net/http/bidirectional_stream.h" | 15 #include "net/http/bidirectional_stream.h" |
16 #include "net/url_request/url_request_context_getter.h" | 16 #include "net/url_request/url_request_context_getter.h" |
17 | 17 |
18 namespace tracked_objects { | |
19 class Location; | |
20 } // namespace tracked_objects | |
21 | |
22 namespace net { | 18 namespace net { |
23 class HttpRequestHeaders; | 19 class HttpRequestHeaders; |
24 class WrappedIOBuffer; | 20 class WrappedIOBuffer; |
25 } // namespace net | 21 } // namespace net |
26 | 22 |
27 namespace grpc_support { | 23 namespace grpc_support { |
28 | 24 |
29 // An adapter to net::BidirectionalStream. | 25 // An adapter to net::BidirectionalStream. |
30 // Created and configured from any thread. Start, ReadData, WriteData and | 26 // Created and configured from any thread. Start, ReadData, WriteData and |
31 // Destroy can be called on any thread (including network thread), and post | 27 // Destroy can be called on any thread (including network thread), and post |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 | 227 |
232 base::WeakPtr<BidirectionalStream> weak_this_; | 228 base::WeakPtr<BidirectionalStream> weak_this_; |
233 base::WeakPtrFactory<BidirectionalStream> weak_factory_; | 229 base::WeakPtrFactory<BidirectionalStream> weak_factory_; |
234 | 230 |
235 DISALLOW_COPY_AND_ASSIGN(BidirectionalStream); | 231 DISALLOW_COPY_AND_ASSIGN(BidirectionalStream); |
236 }; | 232 }; |
237 | 233 |
238 } // namespace grpc_support | 234 } // namespace grpc_support |
239 | 235 |
240 #endif // COMPONENTS_GRPC_SUPPORT_BIDIRECTIONAL_STREAM_H_ | 236 #endif // COMPONENTS_GRPC_SUPPORT_BIDIRECTIONAL_STREAM_H_ |
OLD | NEW |