| 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 #ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_ | 5 #ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_ |
| 6 #define CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_ | 6 #define CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_ |
| 7 | 7 |
| 8 #include <CoreFoundation/CoreFoundation.h> | 8 #include <CoreFoundation/CoreFoundation.h> |
| 9 #include <IOKit/hid/IOHIDManager.h> | 9 #include <IOKit/hid/IOHIDManager.h> |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 // to update data_. | 81 // to update data_. |
| 82 struct AssociatedData { | 82 struct AssociatedData { |
| 83 bool is_xbox; | 83 bool is_xbox; |
| 84 union { | 84 union { |
| 85 struct { | 85 struct { |
| 86 IOHIDDeviceRef device_ref; | 86 IOHIDDeviceRef device_ref; |
| 87 IOHIDElementRef button_elements[blink::WebGamepad::buttonsLengthCap]; | 87 IOHIDElementRef button_elements[blink::WebGamepad::buttonsLengthCap]; |
| 88 IOHIDElementRef axis_elements[blink::WebGamepad::axesLengthCap]; | 88 IOHIDElementRef axis_elements[blink::WebGamepad::axesLengthCap]; |
| 89 CFIndex axis_minimums[blink::WebGamepad::axesLengthCap]; | 89 CFIndex axis_minimums[blink::WebGamepad::axesLengthCap]; |
| 90 CFIndex axis_maximums[blink::WebGamepad::axesLengthCap]; | 90 CFIndex axis_maximums[blink::WebGamepad::axesLengthCap]; |
| 91 CFIndex axis_report_sizes[blink::WebGamepad::axesLengthCap]; |
| 91 } hid; | 92 } hid; |
| 92 struct { | 93 struct { |
| 93 XboxController* device; | 94 XboxController* device; |
| 94 UInt32 location_id; | 95 UInt32 location_id; |
| 95 } xbox; | 96 } xbox; |
| 96 }; | 97 }; |
| 97 }; | 98 }; |
| 98 AssociatedData associated_[blink::WebGamepads::itemsLengthCap]; | 99 AssociatedData associated_[blink::WebGamepads::itemsLengthCap]; |
| 99 | 100 |
| 100 DISALLOW_COPY_AND_ASSIGN(GamepadPlatformDataFetcherMac); | 101 DISALLOW_COPY_AND_ASSIGN(GamepadPlatformDataFetcherMac); |
| 101 }; | 102 }; |
| 102 | 103 |
| 103 } // namespace content | 104 } // namespace content |
| 104 | 105 |
| 105 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_ | 106 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_ |
| OLD | NEW |