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_VR_DISPLAY_IMPL_H | 5 #ifndef DEVICE_VR_VR_DISPLAY_IMPL_H |
6 #define DEVICE_VR_VR_DISPLAY_IMPL_H | 6 #define DEVICE_VR_VR_DISPLAY_IMPL_H |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 public: | 22 public: |
23 VRDisplayImpl(device::VRDevice* device, VRServiceImpl* service); | 23 VRDisplayImpl(device::VRDevice* device, VRServiceImpl* service); |
24 ~VRDisplayImpl() override; | 24 ~VRDisplayImpl() override; |
25 | 25 |
26 mojom::VRDisplayClient* client() { return client_.get(); } | 26 mojom::VRDisplayClient* client() { return client_.get(); } |
27 | 27 |
28 private: | 28 private: |
29 friend class VRDisplayImplTest; | 29 friend class VRDisplayImplTest; |
30 friend class VRServiceImpl; | 30 friend class VRServiceImpl; |
31 | 31 |
32 void GetPose(const GetPoseCallback& callback) override; | 32 void GetPose(mojom::VRPoseClientPtr pose_client) override; |
| 33 //void GetPose(const GetPoseCallback& callback) override; |
33 void ResetPose() override; | 34 void ResetPose() override; |
34 | 35 |
35 void RequestPresent(bool secure_origin, | 36 void RequestPresent(bool secure_origin, |
36 const RequestPresentCallback& callback) override; | 37 const RequestPresentCallback& callback) override; |
37 void ExitPresent() override; | 38 void ExitPresent() override; |
38 void SubmitFrame(mojom::VRPosePtr pose) override; | 39 void SubmitFrame(int32_t surface_handle, mojom::VRPosePtr pose, const SubmitFr
ameCallback& callback) |
| 40 override; |
39 | 41 |
40 void UpdateLayerBounds(mojom::VRLayerBoundsPtr left_bounds, | 42 void UpdateLayerBounds(mojom::VRLayerBoundsPtr left_bounds, |
41 mojom::VRLayerBoundsPtr right_bounds) override; | 43 mojom::VRLayerBoundsPtr right_bounds) override; |
| 44 void GetSurfaceHandle(int32_t width, int32_t height, const GetSurfaceHandleCal
lback& callback) override; |
42 | 45 |
43 void RequestPresentResult(const RequestPresentCallback& callback, | 46 void RequestPresentResult(const RequestPresentCallback& callback, |
44 bool secure_origin, | 47 bool secure_origin, |
45 bool success); | 48 bool success); |
46 | 49 |
47 mojo::Binding<mojom::VRDisplay> binding_; | 50 mojo::Binding<mojom::VRDisplay> binding_; |
48 mojom::VRDisplayClientPtr client_; | 51 mojom::VRDisplayClientPtr client_; |
49 device::VRDevice* device_; | 52 device::VRDevice* device_; |
50 VRServiceImpl* service_; | 53 VRServiceImpl* service_; |
51 | 54 |
52 base::WeakPtrFactory<VRDisplayImpl> weak_ptr_factory_; | 55 base::WeakPtrFactory<VRDisplayImpl> weak_ptr_factory_; |
53 }; | 56 }; |
54 | 57 |
55 } // namespace device | 58 } // namespace device |
56 | 59 |
57 #endif // DEVICE_VR_VR_DISPLAY_IMPL_H | 60 #endif // DEVICE_VR_VR_DISPLAY_IMPL_H |
OLD | NEW |