| 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_TEST_FAKE_VR_DISPLAY_IMPL_CLIENT_H_ | 5 #ifndef DEVICE_VR_TEST_FAKE_VR_DISPLAY_IMPL_CLIENT_H_ |
| 6 #define DEVICE_VR_TEST_FAKE_VR_DISPLAY_IMPL_CLIENT_H_ | 6 #define DEVICE_VR_TEST_FAKE_VR_DISPLAY_IMPL_CLIENT_H_ |
| 7 | 7 |
| 8 #include "device/vr/vr_display_impl.h" | 8 #include "device/vr/vr_display_impl.h" |
| 9 #include "device/vr/vr_service.mojom.h" | 9 #include "device/vr/vr_service.mojom.h" |
| 10 #include "mojo/public/cpp/bindings/binding.h" | 10 #include "mojo/public/cpp/bindings/binding.h" |
| 11 #include "mojo/public/cpp/bindings/interface_request.h" | 11 #include "mojo/public/cpp/bindings/interface_request.h" |
| 12 | 12 |
| 13 namespace device { | 13 namespace device { |
| 14 class FakeVRServiceClient; | 14 class FakeVRServiceClient; |
| 15 | 15 |
| 16 class FakeVRDisplayImplClient : public mojom::VRDisplayClient { | 16 class FakeVRDisplayImplClient : public mojom::VRDisplayClient { |
| 17 public: | 17 public: |
| 18 FakeVRDisplayImplClient(mojom::VRDisplayClientRequest request); | 18 FakeVRDisplayImplClient(mojom::VRDisplayClientRequest request); |
| 19 ~FakeVRDisplayImplClient() override; | 19 ~FakeVRDisplayImplClient() override; |
| 20 | 20 |
| 21 void SetServiceClient(FakeVRServiceClient* service_client); | 21 void SetServiceClient(FakeVRServiceClient* service_client); |
| 22 void OnChanged(mojom::VRDisplayInfoPtr display) override; | 22 void OnChanged(mojom::VRDisplayInfoPtr display) override; |
| 23 void OnExitPresent() override {} | 23 void OnExitPresent() override {} |
| 24 void OnBlur() override {} | 24 void OnBlur() override {} |
| 25 void OnFocus() override {} | 25 void OnFocus() override {} |
| 26 void OnActivate(mojom::VRDisplayEventReason reason) override {} | 26 void OnActivate(mojom::VRDisplayEventReason reason, |
| 27 const OnActivateCallback& callback) override {} |
| 27 void OnDeactivate(mojom::VRDisplayEventReason reason) override {} | 28 void OnDeactivate(mojom::VRDisplayEventReason reason) override {} |
| 28 | 29 |
| 29 private: | 30 private: |
| 30 FakeVRServiceClient* service_client_; | 31 FakeVRServiceClient* service_client_; |
| 31 mojom::VRDisplayInfoPtr last_display_; | 32 mojom::VRDisplayInfoPtr last_display_; |
| 32 mojo::Binding<mojom::VRDisplayClient> m_binding_; | 33 mojo::Binding<mojom::VRDisplayClient> m_binding_; |
| 33 | 34 |
| 34 DISALLOW_COPY_AND_ASSIGN(FakeVRDisplayImplClient); | 35 DISALLOW_COPY_AND_ASSIGN(FakeVRDisplayImplClient); |
| 35 }; | 36 }; |
| 36 | 37 |
| 37 } // namespace device | 38 } // namespace device |
| 38 | 39 |
| 39 #endif // DEVICE_VR_TEST_FAKE_VR_DISPLAY_IMPL_CLIENT_H_ | 40 #endif // DEVICE_VR_TEST_FAKE_VR_DISPLAY_IMPL_CLIENT_H_ |
| OLD | NEW |