| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_QUIC_QUIC_HEADERS_STREAM_H_ | 5 #ifndef NET_QUIC_QUIC_HEADERS_STREAM_H_ |
| 6 #define NET_QUIC_QUIC_HEADERS_STREAM_H_ | 6 #define NET_QUIC_QUIC_HEADERS_STREAM_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // (client and server) will allocate an instance of QuicHeadersStream | 23 // (client and server) will allocate an instance of QuicHeadersStream |
| 24 // to send and receive headers. | 24 // to send and receive headers. |
| 25 class NET_EXPORT_PRIVATE QuicHeadersStream : public ReliableQuicStream { | 25 class NET_EXPORT_PRIVATE QuicHeadersStream : public ReliableQuicStream { |
| 26 public: | 26 public: |
| 27 explicit QuicHeadersStream(QuicSpdySession* session); | 27 explicit QuicHeadersStream(QuicSpdySession* session); |
| 28 ~QuicHeadersStream() override; | 28 ~QuicHeadersStream() override; |
| 29 | 29 |
| 30 // Writes |headers| for |stream_id| in an HTTP/2 HEADERS frame to the peer. | 30 // Writes |headers| for |stream_id| in an HTTP/2 HEADERS frame to the peer. |
| 31 // If |fin| is true, the fin flag will be set on the HEADERS frame. Returns | 31 // If |fin| is true, the fin flag will be set on the HEADERS frame. Returns |
| 32 // the size, in bytes, of the resulting HEADERS frame. | 32 // the size, in bytes, of the resulting HEADERS frame. |
| 33 size_t WriteHeaders(QuicStreamId stream_id, | 33 virtual size_t WriteHeaders(QuicStreamId stream_id, |
| 34 const SpdyHeaderBlock& headers, | 34 const SpdyHeaderBlock& headers, |
| 35 bool fin, | 35 bool fin, |
| 36 SpdyPriority priority, | 36 SpdyPriority priority, |
| 37 QuicAckListenerInterface* ack_listener); | 37 QuicAckListenerInterface* ack_listener); |
| 38 | 38 |
| 39 // Write |headers| for |promised_stream_id| on |original_stream_id| in a | 39 // Write |headers| for |promised_stream_id| on |original_stream_id| in a |
| 40 // PUSH_PROMISE frame to peer. | 40 // PUSH_PROMISE frame to peer. |
| 41 // Return the size, in bytes, of the resulting PUSH_PROMISE frame. | 41 // Return the size, in bytes, of the resulting PUSH_PROMISE frame. |
| 42 size_t WritePushPromise(QuicStreamId original_stream_id, | 42 virtual size_t WritePushPromise(QuicStreamId original_stream_id, |
| 43 QuicStreamId promised_stream_id, | 43 QuicStreamId promised_stream_id, |
| 44 const SpdyHeaderBlock& headers, | 44 const SpdyHeaderBlock& headers, |
| 45 QuicAckListenerInterface* ack_listener); | 45 QuicAckListenerInterface* ack_listener); |
| 46 | 46 |
| 47 // ReliableQuicStream implementation | 47 // ReliableQuicStream implementation |
| 48 void OnDataAvailable() override; | 48 void OnDataAvailable() override; |
| 49 SpdyPriority Priority() const override; | 49 SpdyPriority Priority() const override; |
| 50 | 50 |
| 51 bool supports_push_promise() { return supports_push_promise_; } | 51 bool supports_push_promise() { return supports_push_promise_; } |
| 52 | 52 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 105 |
| 106 SpdyFramer spdy_framer_; | 106 SpdyFramer spdy_framer_; |
| 107 scoped_ptr<SpdyFramerVisitor> spdy_framer_visitor_; | 107 scoped_ptr<SpdyFramerVisitor> spdy_framer_visitor_; |
| 108 | 108 |
| 109 DISALLOW_COPY_AND_ASSIGN(QuicHeadersStream); | 109 DISALLOW_COPY_AND_ASSIGN(QuicHeadersStream); |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 } // namespace net | 112 } // namespace net |
| 113 | 113 |
| 114 #endif // NET_QUIC_QUIC_HEADERS_STREAM_H_ | 114 #endif // NET_QUIC_QUIC_HEADERS_STREAM_H_ |
| OLD | NEW |