| 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 DEVICE_SERIAL_SERIAL_IO_HANDLER_WIN_H_ | 5 #ifndef DEVICE_SERIAL_SERIAL_IO_HANDLER_WIN_H_ |
| 6 #define DEVICE_SERIAL_SERIAL_IO_HANDLER_WIN_H_ | 6 #define DEVICE_SERIAL_SERIAL_IO_HANDLER_WIN_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 serial::ConnectionInfoPtr GetPortInfo() const override; | 31 serial::ConnectionInfoPtr GetPortInfo() const override; |
| 32 bool SetBreak() override; | 32 bool SetBreak() override; |
| 33 bool ClearBreak() override; | 33 bool ClearBreak() override; |
| 34 bool PostOpen() override; | 34 bool PostOpen() override; |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 class UiThreadHelper; | 37 class UiThreadHelper; |
| 38 friend class SerialIoHandler; | 38 friend class SerialIoHandler; |
| 39 | 39 |
| 40 explicit SerialIoHandlerWin( | 40 explicit SerialIoHandlerWin( |
| 41 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner, | |
| 42 scoped_refptr<base::SingleThreadTaskRunner> ui_thread_task_runner); | 41 scoped_refptr<base::SingleThreadTaskRunner> ui_thread_task_runner); |
| 43 ~SerialIoHandlerWin() override; | 42 ~SerialIoHandlerWin() override; |
| 44 | 43 |
| 45 // base::MessageLoopForIO::IOHandler implementation. | 44 // base::MessageLoopForIO::IOHandler implementation. |
| 46 void OnIOCompleted(base::MessageLoopForIO::IOContext* context, | 45 void OnIOCompleted(base::MessageLoopForIO::IOContext* context, |
| 47 DWORD bytes_transfered, | 46 DWORD bytes_transfered, |
| 48 DWORD error) override; | 47 DWORD error) override; |
| 49 | 48 |
| 50 void OnDeviceRemoved(const std::string& device_path); | 49 void OnDeviceRemoved(const std::string& device_path); |
| 51 | 50 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 70 // handler that owns it. | 69 // handler that owns it. |
| 71 UiThreadHelper* helper_; | 70 UiThreadHelper* helper_; |
| 72 base::WeakPtrFactory<SerialIoHandlerWin> weak_factory_; | 71 base::WeakPtrFactory<SerialIoHandlerWin> weak_factory_; |
| 73 | 72 |
| 74 DISALLOW_COPY_AND_ASSIGN(SerialIoHandlerWin); | 73 DISALLOW_COPY_AND_ASSIGN(SerialIoHandlerWin); |
| 75 }; | 74 }; |
| 76 | 75 |
| 77 } // namespace device | 76 } // namespace device |
| 78 | 77 |
| 79 #endif // DEVICE_SERIAL_SERIAL_IO_HANDLER_WIN_H_ | 78 #endif // DEVICE_SERIAL_SERIAL_IO_HANDLER_WIN_H_ |
| OLD | NEW |