| 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 CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_IO_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_IO_HANDLER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_IO_HANDLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_IO_HANDLER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/files/file.h" |
| 9 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 10 #include "base/platform_file.h" | |
| 11 #include "base/threading/non_thread_safe.h" | 11 #include "base/threading/non_thread_safe.h" |
| 12 #include "chrome/common/extensions/api/serial.h" | 12 #include "chrome/common/extensions/api/serial.h" |
| 13 #include "net/base/io_buffer.h" | 13 #include "net/base/io_buffer.h" |
| 14 | 14 |
| 15 namespace extensions { | 15 namespace extensions { |
| 16 | 16 |
| 17 // Provides a simplified interface for performing asynchronous I/O on serial | 17 // Provides a simplified interface for performing asynchronous I/O on serial |
| 18 // devices by hiding platform-specific MessageLoop interfaces. Pending I/O | 18 // devices by hiding platform-specific MessageLoop interfaces. Pending I/O |
| 19 // operations hold a reference to this object until completion so that memory | 19 // operations hold a reference to this object until completion so that memory |
| 20 // doesn't disappear out from under the OS. | 20 // doesn't disappear out from under the OS. |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 164 |
| 165 ReadCompleteCallback read_complete_; | 165 ReadCompleteCallback read_complete_; |
| 166 WriteCompleteCallback write_complete_; | 166 WriteCompleteCallback write_complete_; |
| 167 | 167 |
| 168 DISALLOW_COPY_AND_ASSIGN(SerialIoHandler); | 168 DISALLOW_COPY_AND_ASSIGN(SerialIoHandler); |
| 169 }; | 169 }; |
| 170 | 170 |
| 171 } // namespace extensions | 171 } // namespace extensions |
| 172 | 172 |
| 173 #endif // CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_IO_HANDLER_H_ | 173 #endif // CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_IO_HANDLER_H_ |
| OLD | NEW |