| 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 "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "device/vr/vr_device.h" | 10 #include "device/vr/vr_device.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 public: | 22 public: |
| 23 GvrDevice(GvrDeviceProvider* provider, | 23 GvrDevice(GvrDeviceProvider* provider, |
| 24 const base::WeakPtr<GvrDelegate>& delegate); | 24 const base::WeakPtr<GvrDelegate>& delegate); |
| 25 ~GvrDevice() override; | 25 ~GvrDevice() override; |
| 26 | 26 |
| 27 // VRDevice | 27 // VRDevice |
| 28 mojom::VRDisplayInfoPtr GetVRDevice() override; | 28 mojom::VRDisplayInfoPtr GetVRDevice() override; |
| 29 mojom::VRPosePtr GetPose() override; | 29 mojom::VRPosePtr GetPose() override; |
| 30 void ResetPose() override; | 30 void ResetPose() override; |
| 31 | 31 |
| 32 bool RequestPresent(bool secure_origin) override; | 32 void RequestPresent(const base::Callback<void(bool)>& callback) override; |
| 33 void SetSecureOrigin(bool secure_origin) override; |
| 33 void ExitPresent() override; | 34 void ExitPresent() override; |
| 34 | 35 |
| 35 void SubmitFrame(mojom::VRPosePtr pose) override; | 36 void SubmitFrame(mojom::VRPosePtr pose) override; |
| 36 void UpdateLayerBounds(mojom::VRLayerBoundsPtr left_bounds, | 37 void UpdateLayerBounds(mojom::VRLayerBoundsPtr left_bounds, |
| 37 mojom::VRLayerBoundsPtr right_bounds) override; | 38 mojom::VRLayerBoundsPtr right_bounds) override; |
| 38 | 39 |
| 39 void SetDelegate(const base::WeakPtr<GvrDelegate>& delegate); | 40 void SetDelegate(const base::WeakPtr<GvrDelegate>& delegate); |
| 40 | 41 |
| 41 private: | 42 private: |
| 42 gvr::GvrApi* GetGvrApi(); | 43 gvr::GvrApi* GetGvrApi(); |
| 43 | 44 |
| 44 base::WeakPtr<GvrDelegate> delegate_; | 45 base::WeakPtr<GvrDelegate> delegate_; |
| 45 GvrDeviceProvider* gvr_provider_; | 46 GvrDeviceProvider* gvr_provider_; |
| 46 bool secure_origin_ = false; | 47 bool secure_origin_ = false; |
| 47 uint32_t pose_index_ = 1; | 48 uint32_t pose_index_ = 1; |
| 48 | 49 |
| 49 DISALLOW_COPY_AND_ASSIGN(GvrDevice); | 50 DISALLOW_COPY_AND_ASSIGN(GvrDevice); |
| 50 }; | 51 }; |
| 51 | 52 |
| 52 } // namespace device | 53 } // namespace device |
| 53 | 54 |
| 54 #endif // DEVICE_VR_ANDROID_GVR_DEVICE_H | 55 #endif // DEVICE_VR_ANDROID_GVR_DEVICE_H |
| OLD | NEW |