| 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" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 // Called by the stream on creation to set priority in the write blocked list. | 73 // Called by the stream on creation to set priority in the write blocked list. |
| 74 void RegisterStreamPriority(QuicStreamId id, SpdyPriority priority); | 74 void RegisterStreamPriority(QuicStreamId id, SpdyPriority priority); |
| 75 // Called by the stream on deletion to clear priority crom the write blocked | 75 // Called by the stream on deletion to clear priority crom the write blocked |
| 76 // list. | 76 // list. |
| 77 void UnregisterStreamPriority(QuicStreamId id); | 77 void UnregisterStreamPriority(QuicStreamId id); |
| 78 // Called by the stream on SetPriority to update priority on the write blocked | 78 // Called by the stream on SetPriority to update priority on the write blocked |
| 79 // list. | 79 // list. |
| 80 void UpdateStreamPriority(QuicStreamId id, SpdyPriority new_priority); | 80 void UpdateStreamPriority(QuicStreamId id, SpdyPriority new_priority); |
| 81 | 81 |
| 82 void OnConfigNegotiated() override; |
| 83 |
| 82 protected: | 84 protected: |
| 83 // Override CreateIncomingDynamicStream() and CreateOutgoingDynamicStream() | 85 // Override CreateIncomingDynamicStream() and CreateOutgoingDynamicStream() |
| 84 // with QuicSpdyStream return type to make sure that all data streams are | 86 // with QuicSpdyStream return type to make sure that all data streams are |
| 85 // QuicSpdyStreams. | 87 // QuicSpdyStreams. |
| 86 QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override = 0; | 88 QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override = 0; |
| 87 QuicSpdyStream* CreateOutgoingDynamicStream(SpdyPriority priority) override = | 89 QuicSpdyStream* CreateOutgoingDynamicStream(SpdyPriority priority) override = |
| 88 0; | 90 0; |
| 89 | 91 |
| 90 QuicSpdyStream* GetSpdyDataStream(const QuicStreamId stream_id); | 92 QuicSpdyStream* GetSpdyDataStream(const QuicStreamId stream_id); |
| 91 | 93 |
| 92 // If an incoming stream can be created, return true. | 94 // If an incoming stream can be created, return true. |
| 93 virtual bool ShouldCreateIncomingDynamicStream(QuicStreamId id) = 0; | 95 virtual bool ShouldCreateIncomingDynamicStream(QuicStreamId id) = 0; |
| 94 | 96 |
| 95 // If an outgoing stream can be created, return true. | 97 // If an outgoing stream can be created, return true. |
| 96 virtual bool ShouldCreateOutgoingDynamicStream() = 0; | 98 virtual bool ShouldCreateOutgoingDynamicStream() = 0; |
| 97 | 99 |
| 98 private: | 100 private: |
| 99 friend class test::QuicSpdySessionPeer; | 101 friend class test::QuicSpdySessionPeer; |
| 100 | 102 |
| 101 scoped_ptr<QuicHeadersStream> headers_stream_; | 103 scoped_ptr<QuicHeadersStream> headers_stream_; |
| 102 | 104 |
| 103 DISALLOW_COPY_AND_ASSIGN(QuicSpdySession); | 105 DISALLOW_COPY_AND_ASSIGN(QuicSpdySession); |
| 104 }; | 106 }; |
| 105 | 107 |
| 106 } // namespace net | 108 } // namespace net |
| 107 | 109 |
| 108 #endif // NET_QUIC_QUIC_SPDY_SESSION_H_ | 110 #endif // NET_QUIC_QUIC_SPDY_SESSION_H_ |
| OLD | NEW |