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_mac.h" | 5 #include "content/browser/gamepad/gamepad_platform_data_fetcher_mac.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include "base/mac/foundation_util.h" | 9 #include "base/mac/foundation_util.h" |
8 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| 11 #include "base/macros.h" |
9 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
10 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
11 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
12 #include "base/time/time.h" | 15 #include "base/time/time.h" |
13 | 16 |
14 #import <Foundation/Foundation.h> | 17 #import <Foundation/Foundation.h> |
15 #include <IOKit/hid/IOHIDKeys.h> | 18 #include <IOKit/hid/IOHIDKeys.h> |
16 | 19 |
17 using blink::WebGamepad; | 20 using blink::WebGamepad; |
18 using blink::WebGamepads; | 21 using blink::WebGamepads; |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 pads->length = 0; | 500 pads->length = 0; |
498 return; | 501 return; |
499 } | 502 } |
500 | 503 |
501 pads->length = WebGamepads::itemsLengthCap; | 504 pads->length = WebGamepads::itemsLengthCap; |
502 for (size_t i = 0; i < WebGamepads::itemsLengthCap; ++i) | 505 for (size_t i = 0; i < WebGamepads::itemsLengthCap; ++i) |
503 MapAndSanitizeGamepadData(&pad_state_[i], &pads->items[i]); | 506 MapAndSanitizeGamepadData(&pad_state_[i], &pads->items[i]); |
504 } | 507 } |
505 | 508 |
506 } // namespace content | 509 } // namespace content |
OLD | NEW |