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

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

Issue 2879973002: Expose Gamepad API instance for Cardboard button (Closed)
Patch Set: fix crash in tests Created 3 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 | « chrome/browser/android/vr_shell/vr_shell_gl.cc ('k') | device/vr/BUILD.gn » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_PAD_STATE_PROVIDER_H_ 5 #ifndef DEVICE_GAMEPAD_GAMEPAD_PAD_STATE_PROVIDER_H_
6 #define DEVICE_GAMEPAD_GAMEPAD_PAD_STATE_PROVIDER_H_ 6 #define DEVICE_GAMEPAD_GAMEPAD_PAD_STATE_PROVIDER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <limits> 10 #include <limits>
11 #include <memory> 11 #include <memory>
12 12
13 #include "device/gamepad/gamepad_export.h" 13 #include "device/gamepad/gamepad_export.h"
14 #include "device/gamepad/gamepad_standard_mappings.h" 14 #include "device/gamepad/gamepad_standard_mappings.h"
15 #include "device/gamepad/public/cpp/gamepad.h" 15 #include "device/gamepad/public/cpp/gamepad.h"
16 16
17 namespace device { 17 namespace device {
18 18
19 class GamepadDataFetcher; 19 class GamepadDataFetcher;
20 20
21 enum GamepadSource { 21 enum GamepadSource {
22 GAMEPAD_SOURCE_NONE = 0, 22 GAMEPAD_SOURCE_NONE = 0,
23 GAMEPAD_SOURCE_ANDROID, 23 GAMEPAD_SOURCE_ANDROID,
24 GAMEPAD_SOURCE_GVR, 24 GAMEPAD_SOURCE_GVR,
25 GAMEPAD_SOURCE_CARDBOARD,
25 GAMEPAD_SOURCE_LINUX_UDEV, 26 GAMEPAD_SOURCE_LINUX_UDEV,
26 GAMEPAD_SOURCE_MAC_GC, 27 GAMEPAD_SOURCE_MAC_GC,
27 GAMEPAD_SOURCE_MAC_HID, 28 GAMEPAD_SOURCE_MAC_HID,
28 GAMEPAD_SOURCE_MAC_XBOX, 29 GAMEPAD_SOURCE_MAC_XBOX,
29 GAMEPAD_SOURCE_OPENVR, 30 GAMEPAD_SOURCE_OPENVR,
30 GAMEPAD_SOURCE_TEST, 31 GAMEPAD_SOURCE_TEST,
31 GAMEPAD_SOURCE_WIN_XINPUT, 32 GAMEPAD_SOURCE_WIN_XINPUT,
32 GAMEPAD_SOURCE_WIN_RAW, 33 GAMEPAD_SOURCE_WIN_RAW,
33 }; 34 };
34 35
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 Gamepad* pad, 92 Gamepad* pad,
92 bool sanitize); 93 bool sanitize);
93 94
94 // Tracks the state of each gamepad slot. 95 // Tracks the state of each gamepad slot.
95 std::unique_ptr<PadState[]> pad_states_; 96 std::unique_ptr<PadState[]> pad_states_;
96 }; 97 };
97 98
98 } // namespace device 99 } // namespace device
99 100
100 #endif // DEVICE_GAMEPAD_GAMEPAD_PAD_STATE_PROVIDER_H_ 101 #endif // DEVICE_GAMEPAD_GAMEPAD_PAD_STATE_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell_gl.cc ('k') | device/vr/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698