| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_QUIC_QUIC_SPDY_SESSION_H_ | 5 #ifndef NET_QUIC_QUIC_SPDY_SESSION_H_ |
| 6 #define NET_QUIC_QUIC_SPDY_SESSION_H_ | 6 #define NET_QUIC_QUIC_SPDY_SESSION_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "net/quic/quic_header_list.h" |
| 11 #include "net/quic/quic_headers_stream.h" | 12 #include "net/quic/quic_headers_stream.h" |
| 12 #include "net/quic/quic_session.h" | 13 #include "net/quic/quic_session.h" |
| 13 #include "net/quic/quic_spdy_stream.h" | 14 #include "net/quic/quic_spdy_stream.h" |
| 14 | 15 |
| 15 namespace net { | 16 namespace net { |
| 16 | 17 |
| 17 namespace test { | 18 namespace test { |
| 18 class QuicSpdySessionPeer; | 19 class QuicSpdySessionPeer; |
| 19 } // namespace test | 20 } // namespace test |
| 20 | 21 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 35 // streams. | 36 // streams. |
| 36 virtual void OnStreamHeadersPriority(QuicStreamId stream_id, | 37 virtual void OnStreamHeadersPriority(QuicStreamId stream_id, |
| 37 SpdyPriority priority); | 38 SpdyPriority priority); |
| 38 // Called by |headers_stream_| when headers have been completely received | 39 // Called by |headers_stream_| when headers have been completely received |
| 39 // for a stream. |fin| will be true if the fin flag was set in the headers | 40 // for a stream. |fin| will be true if the fin flag was set in the headers |
| 40 // frame. | 41 // frame. |
| 41 virtual void OnStreamHeadersComplete(QuicStreamId stream_id, | 42 virtual void OnStreamHeadersComplete(QuicStreamId stream_id, |
| 42 bool fin, | 43 bool fin, |
| 43 size_t frame_len); | 44 size_t frame_len); |
| 44 | 45 |
| 46 // Called by |headers_stream_| when headers have been completely received |
| 47 // for a stream. |fin| will be true if the fin flag was set in the headers |
| 48 // frame. |
| 49 virtual void OnStreamHeaderList(QuicStreamId stream_id, |
| 50 bool fin, |
| 51 size_t frame_len, |
| 52 const QuicHeaderList& header_list); |
| 53 |
| 45 // Called by |headers_stream_| when push promise headers have been | 54 // Called by |headers_stream_| when push promise headers have been |
| 46 // received for a stream. | 55 // received for a stream. |
| 47 virtual void OnPromiseHeaders(QuicStreamId stream_id, | 56 virtual void OnPromiseHeaders(QuicStreamId stream_id, |
| 48 StringPiece headers_data); | 57 StringPiece headers_data); |
| 49 | 58 |
| 50 // Called by |headers_stream_| when push promise headers have been | 59 // Called by |headers_stream_| when push promise headers have been |
| 51 // completely received. |fin| will be true if the fin flag was set | 60 // completely received. |fin| will be true if the fin flag was set |
| 52 // in the headers. | 61 // in the headers. |
| 53 virtual void OnPromiseHeadersComplete(QuicStreamId stream_id, | 62 virtual void OnPromiseHeadersComplete(QuicStreamId stream_id, |
| 54 QuicStreamId promised_stream_id, | 63 QuicStreamId promised_stream_id, |
| 55 size_t frame_len); | 64 size_t frame_len); |
| 56 | 65 |
| 66 // Called by |headers_stream_| when push promise headers have been |
| 67 // completely received. |fin| will be true if the fin flag was set |
| 68 // in the headers. |
| 69 virtual void OnPromiseHeaderList(QuicStreamId stream_id, |
| 70 QuicStreamId promised_stream_id, |
| 71 size_t frame_len, |
| 72 const QuicHeaderList& header_list); |
| 73 |
| 57 // Writes |headers| for the stream |id| to the dedicated headers stream. | 74 // Writes |headers| for the stream |id| to the dedicated headers stream. |
| 58 // If |fin| is true, then no more data will be sent for the stream |id|. | 75 // If |fin| is true, then no more data will be sent for the stream |id|. |
| 59 // If provided, |ack_notifier_delegate| will be registered to be notified when | 76 // If provided, |ack_notifier_delegate| will be registered to be notified when |
| 60 // we have seen ACKs for all packets resulting from this call. | 77 // we have seen ACKs for all packets resulting from this call. |
| 61 virtual size_t WriteHeaders(QuicStreamId id, | 78 virtual size_t WriteHeaders(QuicStreamId id, |
| 62 const SpdyHeaderBlock& headers, | 79 const SpdyHeaderBlock& headers, |
| 63 bool fin, | 80 bool fin, |
| 64 SpdyPriority priority, | 81 SpdyPriority priority, |
| 65 QuicAckListenerInterface* ack_notifier_delegate); | 82 QuicAckListenerInterface* ack_notifier_delegate); |
| 66 | 83 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 friend class test::QuicSpdySessionPeer; | 118 friend class test::QuicSpdySessionPeer; |
| 102 | 119 |
| 103 scoped_ptr<QuicHeadersStream> headers_stream_; | 120 scoped_ptr<QuicHeadersStream> headers_stream_; |
| 104 | 121 |
| 105 DISALLOW_COPY_AND_ASSIGN(QuicSpdySession); | 122 DISALLOW_COPY_AND_ASSIGN(QuicSpdySession); |
| 106 }; | 123 }; |
| 107 | 124 |
| 108 } // namespace net | 125 } // namespace net |
| 109 | 126 |
| 110 #endif // NET_QUIC_QUIC_SPDY_SESSION_H_ | 127 #endif // NET_QUIC_QUIC_SPDY_SESSION_H_ |
| OLD | NEW |