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 // The base class for streams which deliver data to/from an application. | 5 // The base class for streams which deliver data to/from an application. |
6 // In each direction, the data on such a stream first contains compressed | 6 // In each direction, the data on such a stream first contains compressed |
7 // headers then body data. | 7 // headers then body data. |
8 | 8 |
9 #ifndef NET_QUIC_QUIC_SPDY_STREAM_H_ | 9 #ifndef NET_QUIC_QUIC_SPDY_STREAM_H_ |
10 #define NET_QUIC_QUIC_SPDY_STREAM_H_ | 10 #define NET_QUIC_QUIC_SPDY_STREAM_H_ |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 class NET_EXPORT_PRIVATE QuicSpdyStream : public ReliableQuicStream { | 45 class NET_EXPORT_PRIVATE QuicSpdyStream : public ReliableQuicStream { |
46 public: | 46 public: |
47 // Visitor receives callbacks from the stream. | 47 // Visitor receives callbacks from the stream. |
48 class NET_EXPORT_PRIVATE Visitor { | 48 class NET_EXPORT_PRIVATE Visitor { |
49 public: | 49 public: |
50 Visitor() {} | 50 Visitor() {} |
51 | 51 |
52 // Called when the stream is closed. | 52 // Called when the stream is closed. |
53 virtual void OnClose(QuicSpdyStream* stream) = 0; | 53 virtual void OnClose(QuicSpdyStream* stream) = 0; |
54 | 54 |
| 55 // Allows subclasses to override and do work. |
| 56 virtual void OnPromiseHeadersComplete(QuicStreamId promised_id, |
| 57 size_t frame_len) {} |
| 58 |
55 protected: | 59 protected: |
56 virtual ~Visitor() {} | 60 virtual ~Visitor() {} |
57 | 61 |
58 private: | 62 private: |
59 DISALLOW_COPY_AND_ASSIGN(Visitor); | 63 DISALLOW_COPY_AND_ASSIGN(Visitor); |
60 }; | 64 }; |
61 | 65 |
62 QuicSpdyStream(QuicStreamId id, QuicSpdySession* spdy_session); | 66 QuicSpdyStream(QuicStreamId id, QuicSpdySession* spdy_session); |
63 ~QuicSpdyStream() override; | 67 ~QuicSpdyStream() override; |
64 | 68 |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 std::string decompressed_trailers_; | 230 std::string decompressed_trailers_; |
227 // The parsed trailers received from the peer. | 231 // The parsed trailers received from the peer. |
228 SpdyHeaderBlock received_trailers_; | 232 SpdyHeaderBlock received_trailers_; |
229 | 233 |
230 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream); | 234 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream); |
231 }; | 235 }; |
232 | 236 |
233 } // namespace net | 237 } // namespace net |
234 | 238 |
235 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_ | 239 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_ |
OLD | NEW |