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

Unified Diff: device/vr/android/gvr/gvr_gamepad_data_fetcher.h

Issue 2762003002: Refactor GVR controller gamepad API integration (Closed)
Patch Set: Rebase, no changes Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/vr/BUILD.gn ('k') | device/vr/android/gvr/gvr_gamepad_data_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/vr/android/gvr/gvr_gamepad_data_fetcher.h
diff --git a/device/vr/android/gvr/gvr_gamepad_data_fetcher.h b/device/vr/android/gvr/gvr_gamepad_data_fetcher.h
index 35f3d9396e3c2c5d4674dcfb57b23dbbd8e32704..816046e51b90461d2f42bff5f0ce92e4477f5970 100644
--- a/device/vr/android/gvr/gvr_gamepad_data_fetcher.h
+++ b/device/vr/android/gvr/gvr_gamepad_data_fetcher.h
@@ -8,9 +8,8 @@
#include <string>
#include "device/gamepad/gamepad_data_fetcher.h"
+#include "device/vr/android/gvr/gvr_gamepad_data_provider.h"
#include "device/vr/vr_export.h"
-#include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/gvr_controller.h"
-#include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/gvr_types.h"
namespace device {
@@ -18,17 +17,17 @@ class DEVICE_VR_EXPORT GvrGamepadDataFetcher : public GamepadDataFetcher {
public:
class Factory : public GamepadDataFetcherFactory {
public:
- Factory(gvr_context* context, unsigned int display_id);
+ Factory(GvrGamepadDataProvider*, unsigned int display_id);
~Factory() override;
std::unique_ptr<GamepadDataFetcher> CreateDataFetcher() override;
GamepadSource source() override;
private:
- gvr_context* context_;
+ GvrGamepadDataProvider* data_provider_;
unsigned int display_id_;
};
- GvrGamepadDataFetcher(gvr_context* context, unsigned int display_id);
+ GvrGamepadDataFetcher(GvrGamepadDataProvider*, unsigned int display_id);
~GvrGamepadDataFetcher() override;
GamepadSource source() override;
@@ -37,11 +36,12 @@ class DEVICE_VR_EXPORT GvrGamepadDataFetcher : public GamepadDataFetcher {
void PauseHint(bool paused) override;
void OnAddedToProvider() override;
+ // Called from GvrGamepadDataProvider
+ void SetGamepadData(GvrGamepadData);
+
private:
- std::unique_ptr<gvr::ControllerApi> controller_api_;
- gvr::ControllerState controller_state_;
- gvr::ControllerHandedness handedness_;
unsigned int display_id_;
+ GvrGamepadData gamepad_data_;
DISALLOW_COPY_AND_ASSIGN(GvrGamepadDataFetcher);
};
« no previous file with comments | « device/vr/BUILD.gn ('k') | device/vr/android/gvr/gvr_gamepad_data_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698