| 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/http/bidirectional_stream_impl.h" | 16 #include "net/http/bidirectional_stream_impl.h" |
| 17 #include "net/http/bidirectional_stream_request_info.h" | 17 #include "net/http/bidirectional_stream_request_info.h" |
| 18 #include "net/http/http_request_info.h" | 18 #include "net/http/http_request_info.h" |
| 19 #include "net/spdy/spdy_read_queue.h" | 19 #include "net/spdy/spdy_read_queue.h" |
| 20 #include "net/spdy/spdy_session.h" | 20 #include "net/spdy/spdy_session.h" |
| 21 #include "net/spdy/spdy_stream.h" | 21 #include "net/spdy/spdy_stream.h" |
| 22 | 22 |
| 23 namespace base { | 23 namespace base { |
| 24 class Timer; | 24 class Timer; |
| 25 } // namespace base | 25 } // namespace base |
| 26 | 26 |
| 27 namespace net { | 27 namespace net { |
| 28 | 28 |
| 29 class BoundNetLog; | 29 class NetLogWithSource; |
| 30 class IOBuffer; | 30 class IOBuffer; |
| 31 class SpdyHeaderBlock; | 31 class SpdyHeaderBlock; |
| 32 | 32 |
| 33 class NET_EXPORT_PRIVATE BidirectionalStreamSpdyImpl | 33 class NET_EXPORT_PRIVATE BidirectionalStreamSpdyImpl |
| 34 : public BidirectionalStreamImpl, | 34 : public BidirectionalStreamImpl, |
| 35 public SpdyStream::Delegate { | 35 public SpdyStream::Delegate { |
| 36 public: | 36 public: |
| 37 explicit BidirectionalStreamSpdyImpl( | 37 explicit BidirectionalStreamSpdyImpl( |
| 38 const base::WeakPtr<SpdySession>& spdy_session); | 38 const base::WeakPtr<SpdySession>& spdy_session); |
| 39 | 39 |
| 40 ~BidirectionalStreamSpdyImpl() override; | 40 ~BidirectionalStreamSpdyImpl() override; |
| 41 | 41 |
| 42 // BidirectionalStreamImpl implementation: | 42 // BidirectionalStreamImpl implementation: |
| 43 void Start(const BidirectionalStreamRequestInfo* request_info, | 43 void Start(const BidirectionalStreamRequestInfo* request_info, |
| 44 const BoundNetLog& net_log, | 44 const NetLogWithSource& net_log, |
| 45 bool send_request_headers_automatically, | 45 bool send_request_headers_automatically, |
| 46 BidirectionalStreamImpl::Delegate* delegate, | 46 BidirectionalStreamImpl::Delegate* delegate, |
| 47 std::unique_ptr<base::Timer> timer) override; | 47 std::unique_ptr<base::Timer> timer) override; |
| 48 void SendRequestHeaders() override; | 48 void SendRequestHeaders() override; |
| 49 int ReadData(IOBuffer* buf, int buf_len) override; | 49 int ReadData(IOBuffer* buf, int buf_len) override; |
| 50 void SendData(const scoped_refptr<IOBuffer>& data, | 50 void SendData(const scoped_refptr<IOBuffer>& data, |
| 51 int length, | 51 int length, |
| 52 bool end_stream) override; | 52 bool end_stream) override; |
| 53 void SendvData(const std::vector<scoped_refptr<IOBuffer>>& buffers, | 53 void SendvData(const std::vector<scoped_refptr<IOBuffer>>& buffers, |
| 54 const std::vector<int>& lengths, | 54 const std::vector<int>& lengths, |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 scoped_refptr<IOBuffer> pending_combined_buffer_; | 108 scoped_refptr<IOBuffer> pending_combined_buffer_; |
| 109 | 109 |
| 110 base::WeakPtrFactory<BidirectionalStreamSpdyImpl> weak_factory_; | 110 base::WeakPtrFactory<BidirectionalStreamSpdyImpl> weak_factory_; |
| 111 | 111 |
| 112 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamSpdyImpl); | 112 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamSpdyImpl); |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 } // namespace net | 115 } // namespace net |
| 116 | 116 |
| 117 #endif // NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ | 117 #endif // NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ |
| OLD | NEW |