Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Side by Side Diff: content/browser/gamepad/gamepad_platform_data_fetcher_mac.h

Issue 1925953002: Ignore HID elements in extraneous application collections on OSX (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698