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_WIN_H_ | 5 #ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_WIN_H_ |
6 #define CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_WIN_H_ | 6 #define CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_WIN_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #ifndef WIN32_LEAN_AND_MEAN | 10 #ifndef WIN32_LEAN_AND_MEAN |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "content/browser/gamepad/raw_input_data_fetcher_win.h" | 27 #include "content/browser/gamepad/raw_input_data_fetcher_win.h" |
28 #include "third_party/WebKit/public/platform/WebGamepads.h" | 28 #include "third_party/WebKit/public/platform/WebGamepads.h" |
29 | 29 |
30 namespace content { | 30 namespace content { |
31 | 31 |
32 class GamepadPlatformDataFetcherWin : public GamepadDataFetcher { | 32 class GamepadPlatformDataFetcherWin : public GamepadDataFetcher { |
33 public: | 33 public: |
34 GamepadPlatformDataFetcherWin(); | 34 GamepadPlatformDataFetcherWin(); |
35 virtual ~GamepadPlatformDataFetcherWin(); | 35 virtual ~GamepadPlatformDataFetcherWin(); |
36 virtual void GetGamepadData(blink::WebGamepads* pads, | 36 virtual void GetGamepadData(blink::WebGamepads* pads, |
37 bool devices_changed_hint) OVERRIDE; | 37 bool devices_changed_hint) override; |
38 virtual void PauseHint(bool paused) OVERRIDE; | 38 virtual void PauseHint(bool paused) override; |
39 | 39 |
40 private: | 40 private: |
41 // XInput-specific implementation for GetGamepadData. | 41 // XInput-specific implementation for GetGamepadData. |
42 bool GetXInputGamepadData(blink::WebGamepads* pads, | 42 bool GetXInputGamepadData(blink::WebGamepads* pads, |
43 bool devices_changed_hint); | 43 bool devices_changed_hint); |
44 | 44 |
45 // The three function types we use from xinput1_3.dll. | 45 // The three function types we use from xinput1_3.dll. |
46 typedef void (WINAPI *XInputEnableFunc)(BOOL enable); | 46 typedef void (WINAPI *XInputEnableFunc)(BOOL enable); |
47 typedef DWORD (WINAPI *XInputGetCapabilitiesFunc)( | 47 typedef DWORD (WINAPI *XInputGetCapabilitiesFunc)( |
48 DWORD dwUserIndex, DWORD dwFlags, XINPUT_CAPABILITIES* pCapabilities); | 48 DWORD dwUserIndex, DWORD dwFlags, XINPUT_CAPABILITIES* pCapabilities); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 PadState pad_state_[blink::WebGamepads::itemsLengthCap]; | 91 PadState pad_state_[blink::WebGamepads::itemsLengthCap]; |
92 | 92 |
93 scoped_ptr<RawInputDataFetcher> raw_input_fetcher_; | 93 scoped_ptr<RawInputDataFetcher> raw_input_fetcher_; |
94 | 94 |
95 DISALLOW_COPY_AND_ASSIGN(GamepadPlatformDataFetcherWin); | 95 DISALLOW_COPY_AND_ASSIGN(GamepadPlatformDataFetcherWin); |
96 }; | 96 }; |
97 | 97 |
98 } // namespace content | 98 } // namespace content |
99 | 99 |
100 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_WIN_H_ | 100 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_WIN_H_ |
OLD | NEW |