OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/gamepad/gamepad_platform_data_fetcher_linux.h" | 5 #include "content/browser/gamepad/gamepad_platform_data_fetcher_linux.h" |
6 | 6 |
7 #include <fcntl.h> | 7 #include <fcntl.h> |
8 #include <linux/joystick.h> | 8 #include <linux/joystick.h> |
9 #include <string.h> | 9 #include <string.h> |
10 #include <sys/stat.h> | 10 #include <sys/stat.h> |
11 #include <sys/types.h> | 11 #include <sys/types.h> |
12 #include <unistd.h> | 12 #include <unistd.h> |
13 | 13 |
| 14 #include "base/macros.h" |
14 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
15 #include "base/posix/eintr_wrapper.h" | 16 #include "base/posix/eintr_wrapper.h" |
16 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
17 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
18 #include "base/strings/stringprintf.h" | 19 #include "base/strings/stringprintf.h" |
19 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
20 #include "base/trace_event/trace_event.h" | 21 #include "base/trace_event/trace_event.h" |
21 #include "content/browser/udev_linux.h" | 22 #include "content/browser/udev_linux.h" |
22 #include "device/udev_linux/scoped_udev.h" | 23 #include "device/udev_linux/scoped_udev.h" |
23 | 24 |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 pad.buttons[item].value = event.value ? 1.0 : 0.0; | 265 pad.buttons[item].value = event.value ? 1.0 : 0.0; |
265 | 266 |
266 if (item >= pad.buttonsLength) | 267 if (item >= pad.buttonsLength) |
267 pad.buttonsLength = item + 1; | 268 pad.buttonsLength = item + 1; |
268 } | 269 } |
269 pad.timestamp = event.time; | 270 pad.timestamp = event.time; |
270 } | 271 } |
271 } | 272 } |
272 | 273 |
273 } // namespace content | 274 } // namespace content |
OLD | NEW |