| 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" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "device/vr/vr_device.h" | 12 #include "device/vr/vr_device.h" |
| 13 #include "device/vr/vr_export.h" | 13 #include "device/vr/vr_export.h" |
| 14 #include "device/vr/vr_service.mojom.h" | 14 #include "device/vr/vr_service.mojom.h" |
| 15 #include "mojo/public/cpp/bindings/binding.h" | 15 #include "mojo/public/cpp/bindings/binding.h" |
| 16 | 16 |
| 17 namespace device { | 17 namespace device { |
| 18 | 18 |
| 19 class VRServiceImpl; |
| 20 |
| 19 class VRDisplayImpl : public mojom::VRDisplay { | 21 class VRDisplayImpl : public mojom::VRDisplay { |
| 20 public: | 22 public: |
| 21 VRDisplayImpl(device::VRDevice* device, VRServiceImpl* service); | 23 VRDisplayImpl(device::VRDevice* device, VRServiceImpl* service); |
| 22 ~VRDisplayImpl() override; | 24 ~VRDisplayImpl() override; |
| 23 | 25 |
| 24 mojom::VRDisplayClient* client() { return client_.get(); } | 26 mojom::VRDisplayClient* client() { return client_.get(); } |
| 25 | 27 |
| 26 private: | 28 private: |
| 27 friend class VRDisplayImplTest; | 29 friend class VRDisplayImplTest; |
| 28 friend class VRServiceImpl; | 30 friend class VRServiceImpl; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 46 mojom::VRDisplayClientPtr client_; | 48 mojom::VRDisplayClientPtr client_; |
| 47 device::VRDevice* device_; | 49 device::VRDevice* device_; |
| 48 VRServiceImpl* service_; | 50 VRServiceImpl* service_; |
| 49 | 51 |
| 50 base::WeakPtrFactory<VRDisplayImpl> weak_ptr_factory_; | 52 base::WeakPtrFactory<VRDisplayImpl> weak_ptr_factory_; |
| 51 }; | 53 }; |
| 52 | 54 |
| 53 } // namespace device | 55 } // namespace device |
| 54 | 56 |
| 55 #endif // DEVICE_VR_VR_DISPLAY_IMPL_H | 57 #endif // DEVICE_VR_VR_DISPLAY_IMPL_H |
| OLD | NEW |