| 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 NavigatorVR_h | 5 #ifndef NavigatorVR_h |
| 6 #define NavigatorVR_h | 6 #define NavigatorVR_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "core/frame/DOMWindowProperty.h" | 9 #include "core/frame/DOMWindowProperty.h" |
| 10 #include "modules/ModulesExport.h" | 10 #include "modules/ModulesExport.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 static NavigatorVR* from(Document&); | 32 static NavigatorVR* from(Document&); |
| 33 static NavigatorVR& from(Navigator&); | 33 static NavigatorVR& from(Navigator&); |
| 34 virtual ~NavigatorVR(); | 34 virtual ~NavigatorVR(); |
| 35 | 35 |
| 36 static ScriptPromise getVRDisplays(ScriptState*, Navigator&); | 36 static ScriptPromise getVRDisplays(ScriptState*, Navigator&); |
| 37 ScriptPromise getVRDisplays(ScriptState*); | 37 ScriptPromise getVRDisplays(ScriptState*); |
| 38 | 38 |
| 39 VRController* controller(); | 39 VRController* controller(); |
| 40 Document* document(); | 40 Document* document(); |
| 41 | 41 |
| 42 void fireVrDisplayOnBlur(VRDisplay*); | 42 // Queues up event to be fired soon. |
| 43 void fireVrDisplayOnFocus(VRDisplay*); | 43 void enqueueVREvent(VRDisplayEvent*); |
| 44 void fireVREvent(VRDisplayEvent*); | 44 |
| 45 // Dispatches a user gesture event immediately. |
| 46 void dispatchVRGestureEvent(VRDisplayEvent*); |
| 45 | 47 |
| 46 DECLARE_VIRTUAL_TRACE(); | 48 DECLARE_VIRTUAL_TRACE(); |
| 47 | 49 |
| 48 private: | 50 private: |
| 49 friend class VRDisplay; | 51 friend class VRDisplay; |
| 50 friend class VRGetDevicesCallback; | 52 friend class VRGetDevicesCallback; |
| 51 | 53 |
| 52 explicit NavigatorVR(LocalFrame*); | 54 explicit NavigatorVR(LocalFrame*); |
| 53 | 55 |
| 54 static const char* supplementName(); | 56 static const char* supplementName(); |
| 55 | 57 |
| 56 void fireVRDisplayPresentChange(VRDisplay*); | 58 void fireVRDisplayPresentChange(VRDisplay*); |
| 57 | 59 |
| 58 Member<VRController> m_controller; | 60 Member<VRController> m_controller; |
| 59 }; | 61 }; |
| 60 | 62 |
| 61 } // namespace blink | 63 } // namespace blink |
| 62 | 64 |
| 63 #endif // NavigatorVR_h | 65 #endif // NavigatorVR_h |
| OLD | NEW |