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

Side by Side Diff: device/vr/android/gvr/gvr_gamepad_data_fetcher.h

Issue 2351573002: Added support for GVR controllers (Closed)
Patch Set: Remove LOG, make string length adjustment suggested by Michael Created 4 years, 3 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 2016 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_ANDROID_GVR_GAMEPAD_DATA_FETCHER_H_
6 #define DEVICE_VR_ANDROID_GVR_GAMEPAD_DATA_FETCHER_H_
7
8 #include <string>
9
10 #include "device/gamepad/gamepad_data_fetcher.h"
11 #include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/g vr_controller.h"
12 #include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/g vr_types.h"
13
14 namespace device {
15
16 class GvrDelegate;
17
18 class GvrGamepadDataFetcher : public GamepadDataFetcher {
19 public:
20 class Factory : public GamepadDataFetcherFactory {
21 public:
22 Factory(GvrDelegate* delegate);
23 ~Factory() override;
24 std::unique_ptr<GamepadDataFetcher> CreateDataFetcher() override;
25 GamepadSource source() override;
26
27 private:
28 GvrDelegate* delegate_;
29 };
30
31 GvrGamepadDataFetcher(GvrDelegate* delegate);
32 ~GvrGamepadDataFetcher() override;
33
34 GamepadSource source() override;
35
36 void GetGamepadData(bool devices_changed_hint) override;
37 void PauseHint(bool paused) override;
38 void OnAddedToProvider() override;
39
40 private:
41 std::unique_ptr<gvr::ControllerApi> controller_api_;
42 gvr::ControllerState controller_state_;
43
44 DISALLOW_COPY_AND_ASSIGN(GvrGamepadDataFetcher);
45 };
46
47 } // namespace device
48 #endif // DEVICE_VR_ANDROID_GVR_GAMEPAD_DATA_FETCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698