| 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 |
| 18 namespace net { | 22 namespace net { |
| 19 class HttpRequestHeaders; | 23 class HttpRequestHeaders; |
| 20 class WrappedIOBuffer; | 24 class WrappedIOBuffer; |
| 21 } // namespace net | 25 } // namespace net |
| 22 | 26 |
| 23 namespace grpc_support { | 27 namespace grpc_support { |
| 24 | 28 |
| 25 // An adapter to net::BidirectionalStream. | 29 // An adapter to net::BidirectionalStream. |
| 26 // Created and configured from any thread. Start, ReadData, WriteData and | 30 // Created and configured from any thread. Start, ReadData, WriteData and |
| 27 // Destroy can be called on any thread (including network thread), and post | 31 // 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... |
| 227 | 231 |
| 228 base::WeakPtr<BidirectionalStream> weak_this_; | 232 base::WeakPtr<BidirectionalStream> weak_this_; |
| 229 base::WeakPtrFactory<BidirectionalStream> weak_factory_; | 233 base::WeakPtrFactory<BidirectionalStream> weak_factory_; |
| 230 | 234 |
| 231 DISALLOW_COPY_AND_ASSIGN(BidirectionalStream); | 235 DISALLOW_COPY_AND_ASSIGN(BidirectionalStream); |
| 232 }; | 236 }; |
| 233 | 237 |
| 234 } // namespace grpc_support | 238 } // namespace grpc_support |
| 235 | 239 |
| 236 #endif // COMPONENTS_GRPC_SUPPORT_BIDIRECTIONAL_STREAM_H_ | 240 #endif // COMPONENTS_GRPC_SUPPORT_BIDIRECTIONAL_STREAM_H_ |
| OLD | NEW |