OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ | 5 #ifndef NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ |
6 #define NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ | 6 #define NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "net/base/load_timing_info.h" | 16 #include "net/base/load_timing_info.h" |
17 #include "net/http/bidirectional_stream_impl.h" | 17 #include "net/http/bidirectional_stream_impl.h" |
18 #include "net/http/bidirectional_stream_request_info.h" | 18 #include "net/http/bidirectional_stream_request_info.h" |
19 #include "net/http/http_request_info.h" | 19 #include "net/http/http_request_info.h" |
20 #include "net/spdy/spdy_read_queue.h" | 20 #include "net/spdy/spdy_read_queue.h" |
21 #include "net/spdy/spdy_session.h" | 21 #include "net/spdy/spdy_session.h" |
22 #include "net/spdy/spdy_stream.h" | 22 #include "net/spdy/spdy_stream.h" |
23 | 23 |
24 namespace base { | 24 namespace base { |
25 class Timer; | 25 class Timer; |
26 } // namespace base | 26 } // namespace base |
27 | 27 |
28 namespace net { | 28 namespace net { |
29 | 29 |
30 class BoundNetLog; | 30 class NetLogWithSource; |
31 class IOBuffer; | 31 class IOBuffer; |
32 class SpdyHeaderBlock; | 32 class SpdyHeaderBlock; |
33 | 33 |
34 class NET_EXPORT_PRIVATE BidirectionalStreamSpdyImpl | 34 class NET_EXPORT_PRIVATE BidirectionalStreamSpdyImpl |
35 : public BidirectionalStreamImpl, | 35 : public BidirectionalStreamImpl, |
36 public SpdyStream::Delegate { | 36 public SpdyStream::Delegate { |
37 public: | 37 public: |
38 explicit BidirectionalStreamSpdyImpl( | 38 explicit BidirectionalStreamSpdyImpl( |
39 const base::WeakPtr<SpdySession>& spdy_session); | 39 const base::WeakPtr<SpdySession>& spdy_session); |
40 | 40 |
41 ~BidirectionalStreamSpdyImpl() override; | 41 ~BidirectionalStreamSpdyImpl() override; |
42 | 42 |
43 // BidirectionalStreamImpl implementation: | 43 // BidirectionalStreamImpl implementation: |
44 void Start(const BidirectionalStreamRequestInfo* request_info, | 44 void Start(const BidirectionalStreamRequestInfo* request_info, |
45 const BoundNetLog& net_log, | 45 const NetLogWithSource& net_log, |
46 bool send_request_headers_automatically, | 46 bool send_request_headers_automatically, |
47 BidirectionalStreamImpl::Delegate* delegate, | 47 BidirectionalStreamImpl::Delegate* delegate, |
48 std::unique_ptr<base::Timer> timer) override; | 48 std::unique_ptr<base::Timer> timer) override; |
49 void SendRequestHeaders() override; | 49 void SendRequestHeaders() override; |
50 int ReadData(IOBuffer* buf, int buf_len) override; | 50 int ReadData(IOBuffer* buf, int buf_len) override; |
51 void SendData(const scoped_refptr<IOBuffer>& data, | 51 void SendData(const scoped_refptr<IOBuffer>& data, |
52 int length, | 52 int length, |
53 bool end_stream) override; | 53 bool end_stream) override; |
54 void SendvData(const std::vector<scoped_refptr<IOBuffer>>& buffers, | 54 void SendvData(const std::vector<scoped_refptr<IOBuffer>>& buffers, |
55 const std::vector<int>& lengths, | 55 const std::vector<int>& lengths, |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 scoped_refptr<IOBuffer> pending_combined_buffer_; | 115 scoped_refptr<IOBuffer> pending_combined_buffer_; |
116 | 116 |
117 base::WeakPtrFactory<BidirectionalStreamSpdyImpl> weak_factory_; | 117 base::WeakPtrFactory<BidirectionalStreamSpdyImpl> weak_factory_; |
118 | 118 |
119 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamSpdyImpl); | 119 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamSpdyImpl); |
120 }; | 120 }; |
121 | 121 |
122 } // namespace net | 122 } // namespace net |
123 | 123 |
124 #endif // NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ | 124 #endif // NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ |
OLD | NEW |