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

Side by Side Diff: device/vr/vr_display_impl.h

Issue 2844833005: Tentatively goes into WebVR presentation mode if page listens to vrdisplayactivate. (Closed)
Patch Set: Fixed device unit tests Created 3 years, 7 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/vr_device.cc ('k') | device/vr/vr_display_impl.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 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 17 matching lines...) Expand all
28 VRDisplayImpl(device::VRDevice* device, 28 VRDisplayImpl(device::VRDevice* device,
29 VRServiceImpl* service, 29 VRServiceImpl* service,
30 mojom::VRServiceClient* service_client, 30 mojom::VRServiceClient* service_client,
31 mojom::VRDisplayInfoPtr display_info); 31 mojom::VRDisplayInfoPtr display_info);
32 ~VRDisplayImpl() override; 32 ~VRDisplayImpl() override;
33 33
34 virtual void OnChanged(mojom::VRDisplayInfoPtr vr_device_info); 34 virtual void OnChanged(mojom::VRDisplayInfoPtr vr_device_info);
35 virtual void OnExitPresent(); 35 virtual void OnExitPresent();
36 virtual void OnBlur(); 36 virtual void OnBlur();
37 virtual void OnFocus(); 37 virtual void OnFocus();
38 virtual void OnActivate(mojom::VRDisplayEventReason reason); 38 virtual void OnActivate(mojom::VRDisplayEventReason reason,
39 const base::Callback<void(bool)>& on_handled);
39 virtual void OnDeactivate(mojom::VRDisplayEventReason reason); 40 virtual void OnDeactivate(mojom::VRDisplayEventReason reason);
40 41
41 private: 42 private:
42 friend class VRDisplayImplTest; 43 friend class VRDisplayImplTest;
43 friend class VRServiceImpl; 44 friend class VRServiceImpl;
44 45
45 void RequestPresent(bool secure_origin, 46 void RequestPresent(bool secure_origin,
46 mojom::VRSubmitFrameClientPtr submit_client, 47 mojom::VRSubmitFrameClientPtr submit_client,
47 const RequestPresentCallback& callback) override; 48 const RequestPresentCallback& callback) override;
48 void ExitPresent() override; 49 void ExitPresent() override;
(...skipping 15 matching lines...) Expand all
64 mojom::VRDisplayClientPtr client_; 65 mojom::VRDisplayClientPtr client_;
65 device::VRDevice* device_; 66 device::VRDevice* device_;
66 VRServiceImpl* service_; 67 VRServiceImpl* service_;
67 68
68 base::WeakPtrFactory<VRDisplayImpl> weak_ptr_factory_; 69 base::WeakPtrFactory<VRDisplayImpl> weak_ptr_factory_;
69 }; 70 };
70 71
71 } // namespace device 72 } // namespace device
72 73
73 #endif // DEVICE_VR_VR_DISPLAY_IMPL_H 74 #endif // DEVICE_VR_VR_DISPLAY_IMPL_H
OLDNEW
« no previous file with comments | « device/vr/vr_device.cc ('k') | device/vr/vr_display_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698