OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef DEVICE_VR_ANDROID_GVR_DEVICE_H | 5 #ifndef DEVICE_VR_ANDROID_GVR_DEVICE_H |
6 #define DEVICE_VR_ANDROID_GVR_DEVICE_H | 6 #define DEVICE_VR_ANDROID_GVR_DEVICE_H |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "device/vr/vr_device.h" | 9 #include "device/vr/vr_device.h" |
10 | 10 |
11 namespace device { | 11 namespace device { |
12 | 12 |
13 class GvrDeviceProvider; | 13 class GvrDeviceProvider; |
14 class GvrDelegate; | 14 class GvrDelegate; |
15 | 15 |
16 class DEVICE_VR_EXPORT GvrDevice : public VRDevice { | 16 class DEVICE_VR_EXPORT GvrDevice : public VRDevice { |
17 public: | 17 public: |
18 GvrDevice(GvrDeviceProvider* provider); | 18 GvrDevice(GvrDeviceProvider* provider); |
19 ~GvrDevice() override; | 19 ~GvrDevice() override; |
20 | 20 |
21 // VRDevice | 21 // VRDevice |
22 void GetVRDevice( | 22 void CreateVRDisplayInfo( |
23 const base::Callback<void(mojom::VRDisplayInfoPtr)>& callback) override; | 23 const base::Callback<void(mojom::VRDisplayInfoPtr)>& onCreated) override; |
24 void ResetPose() override; | 24 void ResetPose() override; |
25 | 25 |
26 void RequestPresent(const base::Callback<void(bool)>& callback) override; | 26 void RequestPresent(const base::Callback<void(bool)>& callback) override; |
27 void SetSecureOrigin(bool secure_origin) override; | 27 void SetSecureOrigin(bool secure_origin) override; |
28 void ExitPresent() override; | 28 void ExitPresent() override; |
29 | 29 |
30 void SubmitFrame(mojom::VRPosePtr pose) override; | 30 void SubmitFrame(mojom::VRPosePtr pose) override; |
31 void UpdateLayerBounds(int16_t frame_index, | 31 void UpdateLayerBounds(int16_t frame_index, |
32 mojom::VRLayerBoundsPtr left_bounds, | 32 mojom::VRLayerBoundsPtr left_bounds, |
33 mojom::VRLayerBoundsPtr right_bounds) override; | 33 mojom::VRLayerBoundsPtr right_bounds) override; |
34 void GetVRVSyncProvider(mojom::VRVSyncProviderRequest request) override; | 34 void GetVRVSyncProvider(mojom::VRVSyncProviderRequest request) override; |
35 void OnDelegateChanged(); | 35 void OnDelegateChanged(); |
36 | 36 |
37 private: | 37 private: |
38 GvrDelegate* GetGvrDelegate(); | 38 GvrDelegate* GetGvrDelegate(); |
39 | 39 |
40 GvrDeviceProvider* gvr_provider_; | 40 GvrDeviceProvider* gvr_provider_; |
41 bool secure_origin_ = false; | 41 bool secure_origin_ = false; |
42 | 42 |
43 DISALLOW_COPY_AND_ASSIGN(GvrDevice); | 43 DISALLOW_COPY_AND_ASSIGN(GvrDevice); |
44 }; | 44 }; |
45 | 45 |
46 } // namespace device | 46 } // namespace device |
47 | 47 |
48 #endif // DEVICE_VR_ANDROID_GVR_DEVICE_H | 48 #endif // DEVICE_VR_ANDROID_GVR_DEVICE_H |
OLD | NEW |