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

Side by Side Diff: third_party/WebKit/Source/modules/vr/VRDisplay.h

Issue 2471433002: Implement WebVR presentation pausing for VR Shell Menu Mode (Closed)
Patch Set: Created 4 years, 1 month 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
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 VRDisplay_h 5 #ifndef VRDisplay_h
6 #define VRDisplay_h 6 #define VRDisplay_h
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/dom/FrameRequestCallback.h" 10 #include "core/dom/FrameRequestCallback.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 void setDepthNear(double value) { m_depthNear = value; } 63 void setDepthNear(double value) { m_depthNear = value; }
64 void setDepthFar(double value) { m_depthFar = value; } 64 void setDepthFar(double value) { m_depthFar = value; }
65 65
66 VREyeParameters* getEyeParameters(const String&); 66 VREyeParameters* getEyeParameters(const String&);
67 67
68 int requestAnimationFrame(FrameRequestCallback*); 68 int requestAnimationFrame(FrameRequestCallback*);
69 void cancelAnimationFrame(int id); 69 void cancelAnimationFrame(int id);
70 void serviceScriptedAnimations(double monotonicAnimationStartTime); 70 void serviceScriptedAnimations(double monotonicAnimationStartTime);
71 71
72 void pausePresent();
73 void resumePresent();
74
72 ScriptPromise requestPresent(ScriptState*, const HeapVector<VRLayer>& layers); 75 ScriptPromise requestPresent(ScriptState*, const HeapVector<VRLayer>& layers);
73 ScriptPromise exitPresent(ScriptState*); 76 ScriptPromise exitPresent(ScriptState*);
74 77
75 HeapVector<VRLayer> getLayers(); 78 HeapVector<VRLayer> getLayers();
76 79
77 void submitFrame(); 80 void submitFrame();
78 81
79 DECLARE_VIRTUAL_TRACE(); 82 DECLARE_VIRTUAL_TRACE();
80 83
81 protected: 84 protected:
(...skipping 17 matching lines...) Expand all
99 void onFullscreenCheck(TimerBase*); 102 void onFullscreenCheck(TimerBase*);
100 103
101 ScriptedAnimationController& ensureScriptedAnimationController(Document*); 104 ScriptedAnimationController& ensureScriptedAnimationController(Document*);
102 105
103 Member<NavigatorVR> m_navigatorVR; 106 Member<NavigatorVR> m_navigatorVR;
104 unsigned m_displayId; 107 unsigned m_displayId;
105 String m_displayName; 108 String m_displayName;
106 bool m_isConnected; 109 bool m_isConnected;
107 bool m_isPresenting; 110 bool m_isPresenting;
108 bool m_canUpdateFramePose; 111 bool m_canUpdateFramePose;
109 unsigned m_compositorHandle;
110 Member<VRDisplayCapabilities> m_capabilities; 112 Member<VRDisplayCapabilities> m_capabilities;
111 Member<VRStageParameters> m_stageParameters; 113 Member<VRStageParameters> m_stageParameters;
112 Member<VREyeParameters> m_eyeParametersLeft; 114 Member<VREyeParameters> m_eyeParametersLeft;
113 Member<VREyeParameters> m_eyeParametersRight; 115 Member<VREyeParameters> m_eyeParametersRight;
114 device::blink::VRPosePtr m_framePose; 116 device::blink::VRPosePtr m_framePose;
115 VRLayer m_layer; 117 VRLayer m_layer;
116 double m_depthNear; 118 double m_depthNear;
117 double m_depthFar; 119 double m_depthFar;
118 120
119 Timer<VRDisplay> m_fullscreenCheckTimer; 121 Timer<VRDisplay> m_fullscreenCheckTimer;
(...skipping 22 matching lines...) Expand all
142 ServiceInactive = 11, 144 ServiceInactive = 11,
143 RequestDenied = 12, 145 RequestDenied = 12,
144 PresentationResultMax, // Must be last member of enum. 146 PresentationResultMax, // Must be last member of enum.
145 }; 147 };
146 148
147 void ReportPresentationResult(PresentationResult); 149 void ReportPresentationResult(PresentationResult);
148 150
149 } // namespace blink 151 } // namespace blink
150 152
151 #endif // VRDisplay_h 153 #endif // VRDisplay_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698