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 #ifndef NET_WEBSOCKETS_WEBSOCKET_DEFLATE_STREAM_H_ | 5 #ifndef NET_WEBSOCKETS_WEBSOCKET_DEFLATE_STREAM_H_ |
6 #define NET_WEBSOCKETS_WEBSOCKET_DEFLATE_STREAM_H_ | 6 #define NET_WEBSOCKETS_WEBSOCKET_DEFLATE_STREAM_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 class NET_EXPORT_PRIVATE WebSocketDeflateStream : public WebSocketStream { | 40 class NET_EXPORT_PRIVATE WebSocketDeflateStream : public WebSocketStream { |
41 public: | 41 public: |
42 WebSocketDeflateStream(scoped_ptr<WebSocketStream> stream, | 42 WebSocketDeflateStream(scoped_ptr<WebSocketStream> stream, |
43 WebSocketDeflater::ContextTakeOverMode mode, | 43 WebSocketDeflater::ContextTakeOverMode mode, |
44 int client_window_bits, | 44 int client_window_bits, |
45 scoped_ptr<WebSocketDeflatePredictor> predictor); | 45 scoped_ptr<WebSocketDeflatePredictor> predictor); |
46 virtual ~WebSocketDeflateStream(); | 46 virtual ~WebSocketDeflateStream(); |
47 | 47 |
48 // WebSocketStream functions. | 48 // WebSocketStream functions. |
49 virtual int ReadFrames(ScopedVector<WebSocketFrame>* frames, | 49 virtual int ReadFrames(ScopedVector<WebSocketFrame>* frames, |
50 const CompletionCallback& callback) OVERRIDE; | 50 const CompletionCallback& callback) override; |
51 virtual int WriteFrames(ScopedVector<WebSocketFrame>* frames, | 51 virtual int WriteFrames(ScopedVector<WebSocketFrame>* frames, |
52 const CompletionCallback& callback) OVERRIDE; | 52 const CompletionCallback& callback) override; |
53 virtual void Close() OVERRIDE; | 53 virtual void Close() override; |
54 virtual std::string GetSubProtocol() const OVERRIDE; | 54 virtual std::string GetSubProtocol() const override; |
55 virtual std::string GetExtensions() const OVERRIDE; | 55 virtual std::string GetExtensions() const override; |
56 | 56 |
57 private: | 57 private: |
58 enum ReadingState { | 58 enum ReadingState { |
59 READING_COMPRESSED_MESSAGE, | 59 READING_COMPRESSED_MESSAGE, |
60 READING_UNCOMPRESSED_MESSAGE, | 60 READING_UNCOMPRESSED_MESSAGE, |
61 NOT_READING, | 61 NOT_READING, |
62 }; | 62 }; |
63 | 63 |
64 enum WritingState { | 64 enum WritingState { |
65 WRITING_COMPRESSED_MESSAGE, | 65 WRITING_COMPRESSED_MESSAGE, |
(...skipping 30 matching lines...) Expand all Loading... |
96 WebSocketFrameHeader::OpCode current_reading_opcode_; | 96 WebSocketFrameHeader::OpCode current_reading_opcode_; |
97 WebSocketFrameHeader::OpCode current_writing_opcode_; | 97 WebSocketFrameHeader::OpCode current_writing_opcode_; |
98 scoped_ptr<WebSocketDeflatePredictor> predictor_; | 98 scoped_ptr<WebSocketDeflatePredictor> predictor_; |
99 | 99 |
100 DISALLOW_COPY_AND_ASSIGN(WebSocketDeflateStream); | 100 DISALLOW_COPY_AND_ASSIGN(WebSocketDeflateStream); |
101 }; | 101 }; |
102 | 102 |
103 } // namespace net | 103 } // namespace net |
104 | 104 |
105 #endif // NET_WEBSOCKETS_WEBSOCKET_DEFLATE_STREAM_H_ | 105 #endif // NET_WEBSOCKETS_WEBSOCKET_DEFLATE_STREAM_H_ |
OLD | NEW |