| 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_VR_DISPLAY_IMPL_H |
| 6 #define DEVICE_VR_VR_DISPLAY_IMPL_H |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "base/macros.h" |
| 11 |
| 12 #include "device/vr/vr_device.h" |
| 13 #include "device/vr/vr_export.h" |
| 14 #include "device/vr/vr_service.mojom.h" |
| 15 #include "mojo/public/cpp/bindings/binding.h" |
| 16 |
| 17 namespace device { |
| 18 |
| 19 class VRDisplayImpl : public mojom::VRDisplay { |
| 20 public: |
| 21 VRDisplayImpl(device::VRDevice* device, VRServiceImpl* service); |
| 22 ~VRDisplayImpl() override; |
| 23 |
| 24 mojom::VRDisplayClient* client() { return client_.get(); } |
| 25 |
| 26 private: |
| 27 friend class VRServiceImpl; |
| 28 |
| 29 void GetPose(const GetPoseCallback& callback) override; |
| 30 void ResetPose() override; |
| 31 |
| 32 void RequestPresent(bool secureOrigin, |
| 33 const RequestPresentCallback& callback) override; |
| 34 void ExitPresent() override; |
| 35 void SubmitFrame(mojom::VRPosePtr pose) override; |
| 36 void UpdateLayerBounds(mojom::VRLayerBoundsPtr leftBounds, |
| 37 mojom::VRLayerBoundsPtr rightBounds) override; |
| 38 |
| 39 mojo::Binding<mojom::VRDisplay> binding_; |
| 40 mojom::VRDisplayClientPtr client_; |
| 41 device::VRDevice* device_; |
| 42 std::unique_ptr<VRServiceImpl> service_; |
| 43 }; |
| 44 |
| 45 } // namespace device |
| 46 |
| 47 #endif // DEVICE_VR_VR_DISPLAY_IMPL_H |
| OLD | NEW |