OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "device/hid/hid_connection_win.h" | 5 #include "device/hid/hid_connection_win.h" |
6 | 6 |
7 #include <cstring> | 7 #include <cstring> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
| 11 #include "base/macros.h" |
11 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
12 #include "base/numerics/safe_conversions.h" | 13 #include "base/numerics/safe_conversions.h" |
13 #include "base/win/object_watcher.h" | 14 #include "base/win/object_watcher.h" |
14 #include "components/device_event_log/device_event_log.h" | 15 #include "components/device_event_log/device_event_log.h" |
15 | 16 |
16 #define INITGUID | 17 #define INITGUID |
17 | 18 |
18 #include <windows.h> | 19 #include <windows.h> |
19 #include <hidclass.h> | 20 #include <hidclass.h> |
20 | 21 |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 if (GetOverlappedResult( | 249 if (GetOverlappedResult( |
249 file_.Get(), transfer->GetOverlapped(), &bytes_transferred, FALSE)) { | 250 file_.Get(), transfer->GetOverlapped(), &bytes_transferred, FALSE)) { |
250 callback.Run(true); | 251 callback.Run(true); |
251 } else { | 252 } else { |
252 HID_PLOG(EVENT) << "HID write failed"; | 253 HID_PLOG(EVENT) << "HID write failed"; |
253 callback.Run(false); | 254 callback.Run(false); |
254 } | 255 } |
255 } | 256 } |
256 | 257 |
257 } // namespace device | 258 } // namespace device |
OLD | NEW |