| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_FRAMER_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_FRAMER_H_ |
| 6 #define EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_FRAMER_H_ | 6 #define EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_FRAMER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "extensions/common/api/cast_channel.h" | 11 #include "extensions/common/api/cast_channel.h" |
| 12 #include "net/base/io_buffer.h" | 12 #include "net/base/io_buffer.h" |
| 13 | 13 |
| 14 namespace extensions { | 14 namespace extensions { |
| 15 namespace core_api { | 15 namespace api { |
| 16 namespace cast_channel { | 16 namespace cast_channel { |
| 17 class CastMessage; | 17 class CastMessage; |
| 18 | 18 |
| 19 // Class for constructing and parsing CastMessage packet data. | 19 // Class for constructing and parsing CastMessage packet data. |
| 20 class MessageFramer { | 20 class MessageFramer { |
| 21 public: | 21 public: |
| 22 // |input_buffer|: The input buffer used by all socket read operations that | 22 // |input_buffer|: The input buffer used by all socket read operations that |
| 23 // feed data into the framer. | 23 // feed data into the framer. |
| 24 explicit MessageFramer(scoped_refptr<net::GrowableIOBuffer> input_buffer); | 24 explicit MessageFramer(scoped_refptr<net::GrowableIOBuffer> input_buffer); |
| 25 ~MessageFramer(); | 25 ~MessageFramer(); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // Input buffer which carries message data read from the socket. | 87 // Input buffer which carries message data read from the socket. |
| 88 // Caller is responsible for writing into this buffer. | 88 // Caller is responsible for writing into this buffer. |
| 89 scoped_refptr<net::GrowableIOBuffer> input_buffer_; | 89 scoped_refptr<net::GrowableIOBuffer> input_buffer_; |
| 90 | 90 |
| 91 // Disables Ingest functionality is the parser receives invalid data. | 91 // Disables Ingest functionality is the parser receives invalid data. |
| 92 bool error_; | 92 bool error_; |
| 93 | 93 |
| 94 DISALLOW_COPY_AND_ASSIGN(MessageFramer); | 94 DISALLOW_COPY_AND_ASSIGN(MessageFramer); |
| 95 }; | 95 }; |
| 96 } // namespace cast_channel | 96 } // namespace cast_channel |
| 97 } // namespace core_api | 97 } // namespace api |
| 98 } // namespace extensions | 98 } // namespace extensions |
| 99 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_FRAMER_H_ | 99 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_FRAMER_H_ |
| OLD | NEW |