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

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

Issue 2762003002: Refactor GVR controller gamepad API integration (Closed)
Patch Set: Fix comment, include gvr_types only for data provider 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
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..d0ef865e611249f56ae5d29775dcc15b43f73497 100644
--- a/device/vr/android/gvr/gvr_gamepad_data_fetcher.h
+++ b/device/vr/android/gvr/gvr_gamepad_data_fetcher.h
@@ -9,26 +9,26 @@
#include "device/gamepad/gamepad_data_fetcher.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 {
+class GvrGamepadDataProvider;
+
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;
@@ -38,9 +38,7 @@ class DEVICE_VR_EXPORT GvrGamepadDataFetcher : public GamepadDataFetcher {
void OnAddedToProvider() override;
private:
- std::unique_ptr<gvr::ControllerApi> controller_api_;
- gvr::ControllerState controller_state_;
- gvr::ControllerHandedness handedness_;
+ GvrGamepadDataProvider* data_provider_;
unsigned int display_id_;
DISALLOW_COPY_AND_ASSIGN(GvrGamepadDataFetcher);

Powered by Google App Engine
This is Rietveld 408576698