OLD | NEW |
(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_DEVICE_PROVIDER_H |
| 6 #define DEVICE_VR_ANDROID_GVR_DEVICE_PROVIDER_H |
| 7 |
| 8 #include <jni.h> |
| 9 |
| 10 #include <map> |
| 11 #include <memory> |
| 12 |
| 13 #include "base/android/jni_android.h" |
| 14 #include "base/macros.h" |
| 15 #include "device/vr/vr_device.h" |
| 16 #include "device/vr/vr_device_provider.h" |
| 17 |
| 18 #include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/g
vr.h" |
| 19 |
| 20 namespace device { |
| 21 |
| 22 class GvrDeviceProvider : public VRDeviceProvider { |
| 23 public: |
| 24 GvrDeviceProvider(); |
| 25 ~GvrDeviceProvider() override; |
| 26 |
| 27 void GetDevices(std::vector<VRDevice*>* devices) override; |
| 28 void Initialize() override; |
| 29 |
| 30 private: |
| 31 std::unique_ptr<VRDevice> vr_device_; |
| 32 |
| 33 base::android::ScopedJavaGlobalRef<jobject> j_device_; |
| 34 std::unique_ptr<gvr::GvrApi> gvr_; |
| 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(GvrDeviceProvider); |
| 37 }; |
| 38 |
| 39 } // namespace device |
| 40 |
| 41 #endif // DEVICE_VR_ANDROID_GVR_DEVICE_PROVIDER_H |
OLD | NEW |