| 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 DEVICE_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_ |
| 6 #define CONTENT_BROWSER_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 "content/browser/gamepad/gamepad_data_fetcher.h" | 18 #include "device/gamepad/gamepad_data_fetcher.h" |
| 19 #include "content/browser/gamepad/xbox_data_fetcher_mac.h" | 19 #include "device/gamepad/xbox_data_fetcher_mac.h" |
| 20 #include "content/common/gamepad_hardware_buffer.h" | |
| 21 | 20 |
| 22 #if defined(__OBJC__) | 21 #if defined(__OBJC__) |
| 23 @class NSArray; | 22 @class NSArray; |
| 24 #else | 23 #else |
| 25 class NSArray; | 24 class NSArray; |
| 26 #endif | 25 #endif |
| 27 | 26 |
| 28 namespace content { | 27 namespace device { |
| 29 | 28 |
| 30 class GamepadPlatformDataFetcherMac : public GamepadDataFetcher, | 29 class GamepadPlatformDataFetcherMac : public GamepadDataFetcher, |
| 31 public XboxDataFetcher::Delegate { | 30 public XboxDataFetcher::Delegate { |
| 32 public: | 31 public: |
| 33 GamepadPlatformDataFetcherMac(); | 32 GamepadPlatformDataFetcherMac(); |
| 34 ~GamepadPlatformDataFetcherMac() override; | 33 ~GamepadPlatformDataFetcherMac() override; |
| 35 void GetGamepadData(blink::WebGamepads* pads, | 34 void GetGamepadData(blink::WebGamepads* pads, |
| 36 bool devices_changed_hint) override; | 35 bool devices_changed_hint) override; |
| 37 void PauseHint(bool paused) override; | 36 void PauseHint(bool paused) override; |
| 38 | 37 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 XboxController* device; | 93 XboxController* device; |
| 95 UInt32 location_id; | 94 UInt32 location_id; |
| 96 } xbox; | 95 } xbox; |
| 97 }; | 96 }; |
| 98 }; | 97 }; |
| 99 AssociatedData associated_[blink::WebGamepads::itemsLengthCap]; | 98 AssociatedData associated_[blink::WebGamepads::itemsLengthCap]; |
| 100 | 99 |
| 101 DISALLOW_COPY_AND_ASSIGN(GamepadPlatformDataFetcherMac); | 100 DISALLOW_COPY_AND_ASSIGN(GamepadPlatformDataFetcherMac); |
| 102 }; | 101 }; |
| 103 | 102 |
| 104 } // namespace content | 103 } // namespace device |
| 105 | 104 |
| 106 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_ | 105 #endif // DEVICE_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_ |
| OLD | NEW |