| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 static void ValueChangedCallback(void* context, | 53 static void ValueChangedCallback(void* context, |
| 54 IOReturn result, | 54 IOReturn result, |
| 55 void* sender, | 55 void* sender, |
| 56 IOHIDValueRef ref); | 56 IOHIDValueRef ref); |
| 57 | 57 |
| 58 size_t GetEmptySlot(); | 58 size_t GetEmptySlot(); |
| 59 size_t GetSlotForDevice(IOHIDDeviceRef device); | 59 size_t GetSlotForDevice(IOHIDDeviceRef device); |
| 60 size_t GetSlotForXboxDevice(XboxController* device); | 60 size_t GetSlotForXboxDevice(XboxController* device); |
| 61 | 61 |
| 62 void DeviceAdd(IOHIDDeviceRef device); | 62 void DeviceAdd(IOHIDDeviceRef device); |
| 63 bool CheckCollection(IOHIDElementRef element); |
| 63 bool AddButtonsAndAxes(NSArray* elements, size_t slot); | 64 bool AddButtonsAndAxes(NSArray* elements, size_t slot); |
| 64 void DeviceRemove(IOHIDDeviceRef device); | 65 void DeviceRemove(IOHIDDeviceRef device); |
| 65 void ValueChanged(IOHIDValueRef value); | 66 void ValueChanged(IOHIDValueRef value); |
| 66 | 67 |
| 67 void XboxDeviceAdd(XboxController* device) override; | 68 void XboxDeviceAdd(XboxController* device) override; |
| 68 void XboxDeviceRemove(XboxController* device) override; | 69 void XboxDeviceRemove(XboxController* device) override; |
| 69 void XboxValueChanged(XboxController* device, | 70 void XboxValueChanged(XboxController* device, |
| 70 const XboxController::Data& data) override; | 71 const XboxController::Data& data) override; |
| 71 | 72 |
| 72 void RegisterForNotifications(); | 73 void RegisterForNotifications(); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 95 }; | 96 }; |
| 96 }; | 97 }; |
| 97 AssociatedData associated_[blink::WebGamepads::itemsLengthCap]; | 98 AssociatedData associated_[blink::WebGamepads::itemsLengthCap]; |
| 98 | 99 |
| 99 DISALLOW_COPY_AND_ASSIGN(GamepadPlatformDataFetcherMac); | 100 DISALLOW_COPY_AND_ASSIGN(GamepadPlatformDataFetcherMac); |
| 100 }; | 101 }; |
| 101 | 102 |
| 102 } // namespace content | 103 } // namespace content |
| 103 | 104 |
| 104 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_ | 105 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_ |
| OLD | NEW |