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

Side by Side Diff: device/vr/openvr/openvr_gamepad_data_fetcher.h

Issue 2825203004: Added support for OpenVR controllers (Closed)
Patch Set: Handle power cycle of controllers 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef DEVICE_VR_OPENVR_GAMEPAD_DATA_FETCHER_H_
6 #define DEVICE_VR_OPENVR_GAMEPAD_DATA_FETCHER_H_
7
8 #include "device/gamepad/gamepad_data_fetcher.h"
9
10 namespace vr {
11 class IVRSystem;
12 } // namespace vr
13
14 namespace device {
15
16 class OpenVRGamepadDataFetcher : public GamepadDataFetcher {
17 public:
18 class Factory : public GamepadDataFetcherFactory {
19 public:
20 Factory(unsigned int display_id);
21 ~Factory() override;
22 std::unique_ptr<GamepadDataFetcher> CreateDataFetcher() override;
23 GamepadSource source() override;
24
25 private:
26 unsigned int display_id_;
27 };
28
29 OpenVRGamepadDataFetcher(unsigned int display_id);
30 ~OpenVRGamepadDataFetcher() override;
31
32 GamepadSource source() override;
33
34 void GetGamepadData(bool devices_changed_hint) override;
35 void PauseHint(bool paused) override;
36 void OnAddedToProvider() override;
37
38 private:
39 unsigned int display_id_;
40 vr::IVRSystem* vr_system_;
41
42 DISALLOW_COPY_AND_ASSIGN(OpenVRGamepadDataFetcher);
43 };
44
45 } // namespace device
46 #endif // DEVICE_VR_OPENVR_GAMEPAD_DATA_FETCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698