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

Side by Side Diff: third_party/WebKit/Source/modules/vr/NavigatorVR.cpp

Issue 2317483002: Add support of vrdisplayconnect and vrdisplaydisconnect event (Closed)
Patch Set: fix missing brace Created 4 years, 3 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
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 #include "modules/vr/NavigatorVR.h" 5 #include "modules/vr/NavigatorVR.h"
6 6
7 #include "bindings/core/v8/ScriptPromiseResolver.h" 7 #include "bindings/core/v8/ScriptPromiseResolver.h"
8 #include "core/dom/DOMException.h" 8 #include "core/dom/DOMException.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/dom/ExceptionCode.h" 10 #include "core/dom/ExceptionCode.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 104 }
105 105
106 void NavigatorVR::fireVRDisplayPresentChange(VRDisplay* display) 106 void NavigatorVR::fireVRDisplayPresentChange(VRDisplay* display)
107 { 107 {
108 if (m_frame && m_frame->localDOMWindow()) { 108 if (m_frame && m_frame->localDOMWindow()) {
109 m_frame->localDOMWindow()->enqueueWindowEvent( 109 m_frame->localDOMWindow()->enqueueWindowEvent(
110 VRDisplayEvent::create(EventTypeNames::vrdisplaypresentchange, true, false, display, "")); 110 VRDisplayEvent::create(EventTypeNames::vrdisplaypresentchange, true, false, display, ""));
111 } 111 }
112 } 112 }
113 113
114 void NavigatorVR::fireVREvent(VRDisplayEvent* event)
115 {
116 if (m_frame && m_frame->localDOMWindow()) {
117 m_frame->localDOMWindow()->enqueueWindowEvent(event);
118 }
119 }
120
114 } // namespace blink 121 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/vr/NavigatorVR.h ('k') | third_party/WebKit/Source/modules/vr/VRController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698