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 <memory> |
| 9 |
8 #include "build/build_config.h" | 10 #include "build/build_config.h" |
9 | 11 |
10 #ifndef WIN32_LEAN_AND_MEAN | 12 #ifndef WIN32_LEAN_AND_MEAN |
11 #define WIN32_LEAN_AND_MEAN | 13 #define WIN32_LEAN_AND_MEAN |
12 #endif | 14 #endif |
13 #include <stdlib.h> | 15 #include <stdlib.h> |
14 #include <Unknwn.h> | 16 #include <Unknwn.h> |
15 #include <WinDef.h> | 17 #include <WinDef.h> |
16 #include <windows.h> | 18 #include <windows.h> |
17 #include <XInput.h> | 19 #include <XInput.h> |
18 | 20 |
19 #include "base/compiler_specific.h" | 21 #include "base/compiler_specific.h" |
20 #include "base/macros.h" | 22 #include "base/macros.h" |
21 #include "base/memory/scoped_ptr.h" | |
22 #include "base/memory/weak_ptr.h" | 23 #include "base/memory/weak_ptr.h" |
23 #include "base/message_loop/message_loop.h" | 24 #include "base/message_loop/message_loop.h" |
24 #include "base/scoped_native_library.h" | 25 #include "base/scoped_native_library.h" |
25 #include "content/browser/gamepad/gamepad_data_fetcher.h" | 26 #include "content/browser/gamepad/gamepad_data_fetcher.h" |
26 #include "content/browser/gamepad/gamepad_standard_mappings.h" | 27 #include "content/browser/gamepad/gamepad_standard_mappings.h" |
27 #include "content/browser/gamepad/raw_input_data_fetcher_win.h" | 28 #include "content/browser/gamepad/raw_input_data_fetcher_win.h" |
28 #include "third_party/WebKit/public/platform/WebGamepads.h" | 29 #include "third_party/WebKit/public/platform/WebGamepads.h" |
29 | 30 |
30 namespace content { | 31 namespace content { |
31 | 32 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 }; | 80 }; |
80 | 81 |
81 struct PlatformPadState { | 82 struct PlatformPadState { |
82 PadConnectionStatus status; | 83 PadConnectionStatus status; |
83 | 84 |
84 int xinput_index; // XInput-only | 85 int xinput_index; // XInput-only |
85 HANDLE raw_input_handle; // RawInput-only fields. | 86 HANDLE raw_input_handle; // RawInput-only fields. |
86 }; | 87 }; |
87 PlatformPadState platform_pad_state_[blink::WebGamepads::itemsLengthCap]; | 88 PlatformPadState platform_pad_state_[blink::WebGamepads::itemsLengthCap]; |
88 | 89 |
89 scoped_ptr<RawInputDataFetcher> raw_input_fetcher_; | 90 std::unique_ptr<RawInputDataFetcher> raw_input_fetcher_; |
90 | 91 |
91 DISALLOW_COPY_AND_ASSIGN(GamepadPlatformDataFetcherWin); | 92 DISALLOW_COPY_AND_ASSIGN(GamepadPlatformDataFetcherWin); |
92 }; | 93 }; |
93 | 94 |
94 } // namespace content | 95 } // namespace content |
95 | 96 |
96 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_WIN_H_ | 97 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_WIN_H_ |
OLD | NEW |