OLD | NEW |
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 VRController_h | 5 #ifndef VRController_h |
6 #define VRController_h | 6 #define VRController_h |
7 | 7 |
8 #include "core/dom/ContextLifecycleObserver.h" | 8 #include "core/dom/ContextLifecycleObserver.h" |
9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
10 #include "device/vr/vr_service.mojom-blink.h" | 10 #include "device/vr/vr_service.mojom-blink.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 USING_GARBAGE_COLLECTED_MIXIN(VRController); | 27 USING_GARBAGE_COLLECTED_MIXIN(VRController); |
28 WTF_MAKE_NONCOPYABLE(VRController); | 28 WTF_MAKE_NONCOPYABLE(VRController); |
29 public: | 29 public: |
30 VRController(NavigatorVR*); | 30 VRController(NavigatorVR*); |
31 virtual ~VRController(); | 31 virtual ~VRController(); |
32 | 32 |
33 // VRService. | 33 // VRService. |
34 void getDisplays(ScriptPromiseResolver*); | 34 void getDisplays(ScriptPromiseResolver*); |
35 device::blink::VRPosePtr getPose(unsigned index); | 35 device::blink::VRPosePtr getPose(unsigned index); |
36 void resetPose(unsigned index); | 36 void resetPose(unsigned index); |
37 void requestPresent(ScriptPromiseResolver*, unsigned index); | 37 void requestPresent(ScriptPromiseResolver*, unsigned index, bool secureOrigi
n); |
38 void exitPresent(unsigned index); | 38 void exitPresent(unsigned index); |
39 void submitFrame(unsigned index, device::blink::VRPosePtr); | 39 void submitFrame(unsigned index, device::blink::VRPosePtr); |
40 void updateLayerBounds(unsigned index, | 40 void updateLayerBounds(unsigned index, |
41 device::blink::VRLayerBoundsPtr leftBounds, | 41 device::blink::VRLayerBoundsPtr leftBounds, |
42 device::blink::VRLayerBoundsPtr rightBounds); | 42 device::blink::VRLayerBoundsPtr rightBounds); |
43 | 43 |
44 VRDisplay* createOrUpdateDisplay(const device::blink::VRDisplayPtr&); | 44 VRDisplay* createOrUpdateDisplay(const device::blink::VRDisplayPtr&); |
45 VRDisplayVector updateDisplays(mojo::WTFArray<device::blink::VRDisplayPtr>); | 45 VRDisplayVector updateDisplays(mojo::WTFArray<device::blink::VRDisplayPtr>); |
46 VRDisplay* getDisplayForIndex(unsigned index); | 46 VRDisplay* getDisplayForIndex(unsigned index); |
47 | 47 |
(...skipping 17 matching lines...) Expand all Loading... |
65 VRDisplayVector m_displays; | 65 VRDisplayVector m_displays; |
66 | 66 |
67 Deque<std::unique_ptr<VRGetDevicesCallback>> m_pendingGetDevicesCallbacks; | 67 Deque<std::unique_ptr<VRGetDevicesCallback>> m_pendingGetDevicesCallbacks; |
68 device::blink::VRServicePtr m_service; | 68 device::blink::VRServicePtr m_service; |
69 mojo::Binding<device::blink::VRServiceClient> m_binding; | 69 mojo::Binding<device::blink::VRServiceClient> m_binding; |
70 }; | 70 }; |
71 | 71 |
72 } // namespace blink | 72 } // namespace blink |
73 | 73 |
74 #endif // VRController_h | 74 #endif // VRController_h |
OLD | NEW |