Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: device/vr/test/fake_vr_device.h

Issue 2746233002: Fixes 2D-to-WebVR site transitions when browsing in VR. (Closed)
Patch Set: Fixed export Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « device/vr/android/gvr/gvr_device.cc ('k') | device/vr/test/fake_vr_device.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_DEVICE_H_ 5 #ifndef DEVICE_VR_TEST_FAKE_VR_DEVICE_H_
6 #define DEVICE_VR_TEST_FAKE_VR_DEVICE_H_ 6 #define DEVICE_VR_TEST_FAKE_VR_DEVICE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "device/vr/vr_device.h" 10 #include "device/vr/vr_device.h"
11 #include "device/vr/vr_device_provider.h" 11 #include "device/vr/vr_device_provider.h"
12 #include "device/vr/vr_service_impl.h" 12 #include "device/vr/vr_service_impl.h"
13 13
14 namespace device { 14 namespace device {
15 15
16 class FakeVRDevice : public VRDevice { 16 class FakeVRDevice : public VRDevice {
17 public: 17 public:
18 explicit FakeVRDevice(); 18 explicit FakeVRDevice();
19 ~FakeVRDevice() override; 19 ~FakeVRDevice() override;
20 20
21 void InitBasicDevice(); 21 void InitBasicDevice();
22 22
23 void SetVRDevice(const mojom::VRDisplayInfoPtr& device); 23 void SetVRDevice(const mojom::VRDisplayInfoPtr& device);
24 24
25 // VRDevice 25 // VRDevice
26 void GetVRDevice( 26 void CreateVRDisplayInfo(
27 const base::Callback<void(mojom::VRDisplayInfoPtr)>& callback) override; 27 const base::Callback<void(mojom::VRDisplayInfoPtr)>& on_created) override;
28 void ResetPose() override; 28 void ResetPose() override;
29 29
30 void RequestPresent(mojom::VRSubmitFrameClientPtr submit_client, 30 void RequestPresent(mojom::VRSubmitFrameClientPtr submit_client,
31 const base::Callback<void(bool)>& callback) override; 31 const base::Callback<void(bool)>& callback) override;
32 void SetSecureOrigin(bool secure_origin) override; 32 void SetSecureOrigin(bool secure_origin) override;
33 void ExitPresent() override; 33 void ExitPresent() override;
34 void SubmitFrame(int16_t frame_index, 34 void SubmitFrame(int16_t frame_index,
35 const gpu::MailboxHolder& mailbox) override; 35 const gpu::MailboxHolder& mailbox) override;
36 void UpdateLayerBounds(int16_t frame_index, 36 void UpdateLayerBounds(int16_t frame_index,
37 mojom::VRLayerBoundsPtr leftBounds, 37 mojom::VRLayerBoundsPtr leftBounds,
38 mojom::VRLayerBoundsPtr rightBounds, 38 mojom::VRLayerBoundsPtr rightBounds,
39 int16_t source_width, 39 int16_t source_width,
40 int16_t source_height) override; 40 int16_t source_height) override;
41 void GetVRVSyncProvider(mojom::VRVSyncProviderRequest request) override; 41 void GetVRVSyncProvider(mojom::VRVSyncProviderRequest request) override;
42 42
43 private: 43 private:
44 mojom::VREyeParametersPtr InitEye(float fov, float offset, uint32_t size); 44 mojom::VREyeParametersPtr InitEye(float fov, float offset, uint32_t size);
45 45
46 mojom::VRDisplayInfoPtr device_; 46 mojom::VRDisplayInfoPtr display_info_;
47 47
48 DISALLOW_COPY_AND_ASSIGN(FakeVRDevice); 48 DISALLOW_COPY_AND_ASSIGN(FakeVRDevice);
49 }; 49 };
50 50
51 } // namespace device 51 } // namespace device
52 52
53 #endif // DEVICE_VR_TEST_FAKE_VR_DEVICE_H_ 53 #endif // DEVICE_VR_TEST_FAKE_VR_DEVICE_H_
OLDNEW
« no previous file with comments | « device/vr/android/gvr/gvr_device.cc ('k') | device/vr/test/fake_vr_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698