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 "base/basictypes.h" | |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "net/quic/quic_data_stream.h" | |
11 #include "net/quic/quic_headers_stream.h" | 8 #include "net/quic/quic_headers_stream.h" |
12 #include "net/quic/quic_session.h" | 9 #include "net/quic/quic_session.h" |
| 10 #include "net/quic/quic_spdy_stream.h" |
13 | 11 |
14 namespace net { | 12 namespace net { |
15 | 13 |
16 namespace test { | 14 namespace test { |
17 class QuicSpdySessionPeer; | 15 class QuicSpdySessionPeer; |
18 } // namespace test | 16 } // namespace test |
19 | 17 |
20 // A QUIC session with a headers stream. | 18 // A QUIC session with a headers stream. |
21 class NET_EXPORT_PRIVATE QuicSpdySession : public QuicSession { | 19 class NET_EXPORT_PRIVATE QuicSpdySession : public QuicSession { |
22 public: | 20 public: |
(...skipping 25 matching lines...) Expand all Loading... |
48 size_t WriteHeaders(QuicStreamId id, | 46 size_t WriteHeaders(QuicStreamId id, |
49 const SpdyHeaderBlock& headers, | 47 const SpdyHeaderBlock& headers, |
50 bool fin, | 48 bool fin, |
51 QuicPriority priority, | 49 QuicPriority priority, |
52 QuicAckListenerInterface* ack_notifier_delegate); | 50 QuicAckListenerInterface* ack_notifier_delegate); |
53 | 51 |
54 QuicHeadersStream* headers_stream() { return headers_stream_.get(); } | 52 QuicHeadersStream* headers_stream() { return headers_stream_.get(); } |
55 | 53 |
56 protected: | 54 protected: |
57 // Override CreateIncomingDynamicStream() and CreateOutgoingDynamicStream() | 55 // Override CreateIncomingDynamicStream() and CreateOutgoingDynamicStream() |
58 // with QuicDataStream return type to make sure that all data streams are | 56 // with QuicSpdyStream return type to make sure that all data streams are |
59 // QuicDataStreams. | 57 // QuicSpdyStreams. |
60 QuicDataStream* CreateIncomingDynamicStream(QuicStreamId id) override = 0; | 58 QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override = 0; |
61 QuicDataStream* CreateOutgoingDynamicStream() override = 0; | 59 QuicSpdyStream* CreateOutgoingDynamicStream() override = 0; |
62 | 60 |
63 QuicDataStream* GetSpdyDataStream(const QuicStreamId stream_id); | 61 QuicSpdyStream* GetSpdyDataStream(const QuicStreamId stream_id); |
64 | 62 |
65 private: | 63 private: |
66 friend class test::QuicSpdySessionPeer; | 64 friend class test::QuicSpdySessionPeer; |
67 | 65 |
68 scoped_ptr<QuicHeadersStream> headers_stream_; | 66 scoped_ptr<QuicHeadersStream> headers_stream_; |
69 | 67 |
70 DISALLOW_COPY_AND_ASSIGN(QuicSpdySession); | 68 DISALLOW_COPY_AND_ASSIGN(QuicSpdySession); |
71 }; | 69 }; |
72 | 70 |
73 } // namespace net | 71 } // namespace net |
74 | 72 |
75 #endif // NET_QUIC_QUIC_SPDY_SESSION_H_ | 73 #endif // NET_QUIC_QUIC_SPDY_SESSION_H_ |
OLD | NEW |