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

Side by Side Diff: device/gamepad/gamepad_platform_data_fetcher_mac.h

Issue 2808093006: [Device Service] Move Gamepad Blink headers to be part of the Gamepad client library (Closed)
Patch Set: rebase and address comments Created 3 years, 8 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
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 DEVICE_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_ 5 #ifndef DEVICE_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_
6 #define DEVICE_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_ 6 #define DEVICE_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>
11 11
12 #include <memory> 12 #include <memory>
13 13
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/mac/scoped_cftyperef.h" 15 #include "base/mac/scoped_cftyperef.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "build/build_config.h" 17 #include "build/build_config.h"
18 #include "device/gamepad/gamepad_data_fetcher.h" 18 #include "device/gamepad/gamepad_data_fetcher.h"
19 #include "device/gamepad/public/cpp/gamepad.h"
19 20
20 #if defined(__OBJC__) 21 #if defined(__OBJC__)
21 @class NSArray; 22 @class NSArray;
22 #else 23 #else
23 class NSArray; 24 class NSArray;
24 #endif 25 #endif
25 26
26 namespace device { 27 namespace device {
27 28
28 class GamepadPlatformDataFetcherMac : public GamepadDataFetcher { 29 class GamepadPlatformDataFetcherMac : public GamepadDataFetcher {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 void ValueChanged(IOHIDValueRef value); 71 void ValueChanged(IOHIDValueRef value);
71 72
72 void RegisterForNotifications(); 73 void RegisterForNotifications();
73 void UnregisterFromNotifications(); 74 void UnregisterFromNotifications();
74 75
75 // Side-band data that's not passed to the consumer, but we need to maintain 76 // Side-band data that's not passed to the consumer, but we need to maintain
76 // to update data_. 77 // to update data_.
77 struct AssociatedData { 78 struct AssociatedData {
78 int location_id; 79 int location_id;
79 IOHIDDeviceRef device_ref; 80 IOHIDDeviceRef device_ref;
80 IOHIDElementRef button_elements[blink::WebGamepad::kButtonsLengthCap]; 81 IOHIDElementRef button_elements[Gamepad::kButtonsLengthCap];
81 IOHIDElementRef axis_elements[blink::WebGamepad::kAxesLengthCap]; 82 IOHIDElementRef axis_elements[Gamepad::kAxesLengthCap];
82 CFIndex axis_minimums[blink::WebGamepad::kAxesLengthCap]; 83 CFIndex axis_minimums[Gamepad::kAxesLengthCap];
83 CFIndex axis_maximums[blink::WebGamepad::kAxesLengthCap]; 84 CFIndex axis_maximums[Gamepad::kAxesLengthCap];
84 CFIndex axis_report_sizes[blink::WebGamepad::kAxesLengthCap]; 85 CFIndex axis_report_sizes[Gamepad::kAxesLengthCap];
85 }; 86 };
86 AssociatedData associated_[blink::WebGamepads::kItemsLengthCap]; 87 AssociatedData associated_[Gamepads::kItemsLengthCap];
87 88
88 DISALLOW_COPY_AND_ASSIGN(GamepadPlatformDataFetcherMac); 89 DISALLOW_COPY_AND_ASSIGN(GamepadPlatformDataFetcherMac);
89 }; 90 };
90 91
91 } // namespace device 92 } // namespace device
92 93
93 #endif // DEVICE_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_ 94 #endif // DEVICE_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_
OLDNEW
« no previous file with comments | « device/gamepad/gamepad_platform_data_fetcher_linux.cc ('k') | device/gamepad/gamepad_platform_data_fetcher_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698