| 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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // Asynchronous event mask state | 59 // Asynchronous event mask state |
| 60 DWORD event_mask_; | 60 DWORD event_mask_; |
| 61 | 61 |
| 62 // Indicates if a pending read is waiting on initial data arrival via | 62 // Indicates if a pending read is waiting on initial data arrival via |
| 63 // WaitCommEvent, as opposed to waiting on actual ReadFile completion | 63 // WaitCommEvent, as opposed to waiting on actual ReadFile completion |
| 64 // after a corresponding WaitCommEvent has completed. | 64 // after a corresponding WaitCommEvent has completed. |
| 65 bool is_comm_pending_; | 65 bool is_comm_pending_; |
| 66 | 66 |
| 67 // The helper lives on the UI thread and holds a weak reference back to the | 67 // The helper lives on the UI thread and holds a weak reference back to the |
| 68 // handler that owns it. | 68 // handler that owns it. |
| 69 UiThreadHelper* helper_ = nullptr; | 69 UiThreadHelper* helper_; |
| 70 base::WeakPtrFactory<SerialIoHandlerWin> weak_factory_; | 70 base::WeakPtrFactory<SerialIoHandlerWin> weak_factory_; |
| 71 | 71 |
| 72 DISALLOW_COPY_AND_ASSIGN(SerialIoHandlerWin); | 72 DISALLOW_COPY_AND_ASSIGN(SerialIoHandlerWin); |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } // namespace device | 75 } // namespace device |
| 76 | 76 |
| 77 #endif // DEVICE_SERIAL_SERIAL_IO_HANDLER_WIN_H_ | 77 #endif // DEVICE_SERIAL_SERIAL_IO_HANDLER_WIN_H_ |
| OLD | NEW |