| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_TOOLS_FLIP_SERVER_SPDY_INTERFACE_H_ | 5 #ifndef NET_TOOLS_FLIP_SERVER_SPDY_INTERFACE_H_ |
| 6 #define NET_TOOLS_FLIP_SERVER_SPDY_INTERFACE_H_ | 6 #define NET_TOOLS_FLIP_SERVER_SPDY_INTERFACE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <map> | 11 #include <map> |
| 12 #include <memory> | 12 #include <memory> |
| 13 #include <string> | 13 #include <string> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
| 17 #include "net/spdy/buffered_spdy_framer.h" | 17 #include "net/spdy/buffered_spdy_framer.h" |
| 18 #include "net/spdy/spdy_alt_svc_wire_format.h" |
| 18 #include "net/spdy/spdy_protocol.h" | 19 #include "net/spdy/spdy_protocol.h" |
| 19 #include "net/tools/balsa/balsa_headers.h" | 20 #include "net/tools/balsa/balsa_headers.h" |
| 20 #include "net/tools/balsa/balsa_visitor_interface.h" | 21 #include "net/tools/balsa/balsa_visitor_interface.h" |
| 21 #include "net/tools/flip_server/output_ordering.h" | 22 #include "net/tools/flip_server/output_ordering.h" |
| 22 #include "net/tools/flip_server/sm_connection.h" | 23 #include "net/tools/flip_server/sm_connection.h" |
| 23 #include "net/tools/flip_server/sm_interface.h" | 24 #include "net/tools/flip_server/sm_interface.h" |
| 24 | 25 |
| 25 namespace net { | 26 namespace net { |
| 26 | 27 |
| 27 class FlipAcceptor; | 28 class FlipAcceptor; |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 base::StringPiece debug_data) override {} | 134 base::StringPiece debug_data) override {} |
| 134 | 135 |
| 135 // Called when a WINDOW_UPDATE frame has been parsed. | 136 // Called when a WINDOW_UPDATE frame has been parsed. |
| 136 void OnWindowUpdate(SpdyStreamId stream_id, int delta_window_size) override {} | 137 void OnWindowUpdate(SpdyStreamId stream_id, int delta_window_size) override {} |
| 137 | 138 |
| 138 // Called when a PUSH_PROMISE frame has been parsed. | 139 // Called when a PUSH_PROMISE frame has been parsed. |
| 139 void OnPushPromise(SpdyStreamId stream_id, | 140 void OnPushPromise(SpdyStreamId stream_id, |
| 140 SpdyStreamId promised_stream_id, | 141 SpdyStreamId promised_stream_id, |
| 141 const SpdyHeaderBlock& headers) override {} | 142 const SpdyHeaderBlock& headers) override {} |
| 142 | 143 |
| 144 // Called when an ALTSVC frame has been parsed. |
| 145 void OnAltSvc(SpdyStreamId stream_id, |
| 146 base::StringPiece origin, |
| 147 const SpdyAltSvcWireFormat::AlternativeServiceVector& |
| 148 altsvc_vector) override {} |
| 149 |
| 143 bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override; | 150 bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override; |
| 144 | 151 |
| 145 public: | 152 public: |
| 146 size_t ProcessReadInput(const char* data, size_t len) override; | 153 size_t ProcessReadInput(const char* data, size_t len) override; |
| 147 size_t ProcessWriteInput(const char* data, size_t len) override; | 154 size_t ProcessWriteInput(const char* data, size_t len) override; |
| 148 bool MessageFullyRead() const override; | 155 bool MessageFullyRead() const override; |
| 149 void SetStreamID(uint32_t stream_id) override {} | 156 void SetStreamID(uint32_t stream_id) override {} |
| 150 bool Error() const override; | 157 bool Error() const override; |
| 151 const char* ErrorAsString() const override; | 158 const char* ErrorAsString() const override; |
| 152 void Reset() override {} | 159 void Reset() override {} |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 typedef std::map<uint32_t, SMInterface*> StreamToSmif; | 229 typedef std::map<uint32_t, SMInterface*> StreamToSmif; |
| 223 StreamToSmif stream_to_smif_; | 230 StreamToSmif stream_to_smif_; |
| 224 bool close_on_error_; | 231 bool close_on_error_; |
| 225 | 232 |
| 226 static std::string forward_ip_header_; | 233 static std::string forward_ip_header_; |
| 227 }; | 234 }; |
| 228 | 235 |
| 229 } // namespace net | 236 } // namespace net |
| 230 | 237 |
| 231 #endif // NET_TOOLS_FLIP_SERVER_SPDY_INTERFACE_H_ | 238 #endif // NET_TOOLS_FLIP_SERVER_SPDY_INTERFACE_H_ |
| OLD | NEW |