| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef NET_HTTP2_DECODER_FRAME_PARTS_COLLECTOR_LISTENER_H_ | |
| 6 #define NET_HTTP2_DECODER_FRAME_PARTS_COLLECTOR_LISTENER_H_ | |
| 7 | |
| 8 // FramePartsCollectorListener extends FramePartsCollector with an | |
| 9 // implementation of every method of Http2FrameDecoderListener; it is | |
| 10 // essentially the union of all the Listener classes in the tests of the | |
| 11 // payload decoders (i.e. in ./payload_decoders/*_test.cc files), with the | |
| 12 // addition of the OnFrameHeader method. | |
| 13 // FramePartsCollectorListener supports tests of Http2FrameDecoder. | |
| 14 | |
| 15 #include <stddef.h> | |
| 16 | |
| 17 #include "net/http2/decoder/frame_parts_collector.h" | |
| 18 #include "net/http2/decoder/http2_frame_decoder_listener.h" | |
| 19 #include "net/http2/http2_constants.h" | |
| 20 #include "net/http2/http2_structures.h" | |
| 21 | |
| 22 namespace net { | |
| 23 namespace test { | |
| 24 | |
| 25 class FramePartsCollectorListener : public FramePartsCollector { | |
| 26 public: | |
| 27 FramePartsCollectorListener() {} | |
| 28 ~FramePartsCollectorListener() override {} | |
| 29 | |
| 30 // TODO(jamessynge): Remove OnFrameHeader once done with supporting | |
| 31 // SpdyFramer's exact states. | |
| 32 bool OnFrameHeader(const Http2FrameHeader& header) override; | |
| 33 void OnDataStart(const Http2FrameHeader& header) override; | |
| 34 void OnDataPayload(const char* data, size_t len) override; | |
| 35 void OnDataEnd() override; | |
| 36 void OnHeadersStart(const Http2FrameHeader& header) override; | |
| 37 void OnHeadersPriority(const Http2PriorityFields& priority) override; | |
| 38 void OnHpackFragment(const char* data, size_t len) override; | |
| 39 void OnHeadersEnd() override; | |
| 40 void OnPriorityFrame(const Http2FrameHeader& header, | |
| 41 const Http2PriorityFields& priority_fields) override; | |
| 42 void OnContinuationStart(const Http2FrameHeader& header) override; | |
| 43 void OnContinuationEnd() override; | |
| 44 void OnPadLength(size_t pad_length) override; | |
| 45 void OnPadding(const char* padding, size_t skipped_length) override; | |
| 46 void OnRstStream(const Http2FrameHeader& header, | |
| 47 Http2ErrorCode error_code) override; | |
| 48 void OnSettingsStart(const Http2FrameHeader& header) override; | |
| 49 void OnSetting(const Http2SettingFields& setting_fields) override; | |
| 50 void OnSettingsEnd() override; | |
| 51 void OnSettingsAck(const Http2FrameHeader& header) override; | |
| 52 void OnPushPromiseStart(const Http2FrameHeader& header, | |
| 53 const Http2PushPromiseFields& promise, | |
| 54 size_t total_padding_length) override; | |
| 55 void OnPushPromiseEnd() override; | |
| 56 void OnPing(const Http2FrameHeader& header, | |
| 57 const Http2PingFields& ping) override; | |
| 58 void OnPingAck(const Http2FrameHeader& header, | |
| 59 const Http2PingFields& ping) override; | |
| 60 void OnGoAwayStart(const Http2FrameHeader& header, | |
| 61 const Http2GoAwayFields& goaway) override; | |
| 62 void OnGoAwayOpaqueData(const char* data, size_t len) override; | |
| 63 void OnGoAwayEnd() override; | |
| 64 void OnWindowUpdate(const Http2FrameHeader& header, | |
| 65 uint32_t window_size_increment) override; | |
| 66 void OnAltSvcStart(const Http2FrameHeader& header, | |
| 67 size_t origin_length, | |
| 68 size_t value_length) override; | |
| 69 void OnAltSvcOriginData(const char* data, size_t len) override; | |
| 70 void OnAltSvcValueData(const char* data, size_t len) override; | |
| 71 void OnAltSvcEnd() override; | |
| 72 void OnUnknownStart(const Http2FrameHeader& header) override; | |
| 73 void OnUnknownPayload(const char* data, size_t len) override; | |
| 74 void OnUnknownEnd() override; | |
| 75 void OnPaddingTooLong(const Http2FrameHeader& header, | |
| 76 size_t missing_length) override; | |
| 77 void OnFrameSizeError(const Http2FrameHeader& header) override; | |
| 78 }; | |
| 79 | |
| 80 } // namespace test | |
| 81 } // namespace net | |
| 82 | |
| 83 #endif // NET_HTTP2_DECODER_FRAME_PARTS_COLLECTOR_LISTENER_H_ | |
| OLD | NEW |