| Index: net/quic/quic_packet_generator.h
|
| diff --git a/net/quic/quic_packet_generator.h b/net/quic/quic_packet_generator.h
|
| index 9af5d8a4b55b3b652a6d1f7355503ad90e1c2a35..f47a540194aca5e24fd1167df87b1d8ee28818c6 100644
|
| --- a/net/quic/quic_packet_generator.h
|
| +++ b/net/quic/quic_packet_generator.h
|
| @@ -70,7 +70,19 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
|
| virtual bool OnSerializedPacket(const SerializedPacket& packet) = 0;
|
| };
|
|
|
| + // Interface which gets callbacks from the QuicPacketGenerator at interesting
|
| + // points. Implementations must not mutate the state of the generator
|
| + // as a result of these callbacks.
|
| + class NET_EXPORT_PRIVATE DebugDelegateInterface {
|
| + public:
|
| + virtual ~DebugDelegateInterface() {}
|
| +
|
| + // Called when a frame has been added to the current packet.
|
| + virtual void OnFrameAddedToPacket(const QuicFrame& frame) = 0;
|
| + };
|
| +
|
| QuicPacketGenerator(DelegateInterface* delegate,
|
| + DebugDelegateInterface* debug_delegate,
|
| QuicPacketCreator* creator);
|
|
|
| virtual ~QuicPacketGenerator();
|
| @@ -89,14 +101,21 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
|
|
|
| bool HasQueuedFrames() const;
|
|
|
| + void set_debug_delegate(DebugDelegateInterface* debug_delegate) {
|
| + debug_delegate_ = debug_delegate;
|
| + }
|
| +
|
| private:
|
| void SendQueuedFrames();
|
|
|
| bool HasPendingFrames() const;
|
| bool AddNextPendingFrame();
|
| +
|
| + bool AddFrame(const QuicFrame& frame);
|
| void SerializeAndSendPacket();
|
|
|
| DelegateInterface* delegate_;
|
| + DebugDelegateInterface* debug_delegate_;
|
|
|
| QuicPacketCreator* packet_creator_;
|
| QuicFrames queued_control_frames_;
|
|
|