Chromium Code Reviews| 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 #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/DocumentUserGestureToken.h" | 10 #include "core/dom/DocumentUserGestureToken.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 103 return "NavigatorVR"; | 103 return "NavigatorVR"; |
| 104 } | 104 } |
| 105 | 105 |
| 106 void NavigatorVR::enqueueVREvent(VRDisplayEvent* event) { | 106 void NavigatorVR::enqueueVREvent(VRDisplayEvent* event) { |
| 107 if (host()->frame()) { | 107 if (host()->frame()) { |
| 108 host()->frame()->domWindow()->enqueueWindowEvent(event); | 108 host()->frame()->domWindow()->enqueueWindowEvent(event); |
| 109 } | 109 } |
| 110 } | 110 } |
| 111 | 111 |
| 112 void NavigatorVR::dispatchVRGestureEvent(VRDisplayEvent* event) { | 112 void NavigatorVR::dispatchVRGestureEvent(VRDisplayEvent* event) { |
| 113 if (host()->frame()) | 113 if (!(host()->frame())) |
|
haraken
2017/01/11 23:47:01
Sorry... I think this is a bug my CL injected.
| |
| 114 return; | 114 return; |
| 115 UserGestureIndicator gestureIndicator( | 115 UserGestureIndicator gestureIndicator( |
| 116 DocumentUserGestureToken::create(document())); | 116 DocumentUserGestureToken::create(document())); |
| 117 LocalDOMWindow* window = host()->frame()->domWindow(); | 117 LocalDOMWindow* window = host()->frame()->domWindow(); |
| 118 DCHECK(window); | 118 DCHECK(window); |
| 119 event->setTarget(window); | 119 event->setTarget(window); |
| 120 window->dispatchEvent(event); | 120 window->dispatchEvent(event); |
| 121 } | 121 } |
| 122 | 122 |
| 123 void NavigatorVR::pageVisibilityChanged() { | 123 void NavigatorVR::pageVisibilityChanged() { |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 151 } | 151 } |
| 152 | 152 |
| 153 void NavigatorVR::didRemoveAllEventListeners(LocalDOMWindow* window) { | 153 void NavigatorVR::didRemoveAllEventListeners(LocalDOMWindow* window) { |
| 154 if (m_controller) { | 154 if (m_controller) { |
| 155 m_controller->setListeningForActivate(false); | 155 m_controller->setListeningForActivate(false); |
| 156 m_listeningForActivate = false; | 156 m_listeningForActivate = false; |
| 157 } | 157 } |
| 158 } | 158 } |
| 159 | 159 |
| 160 } // namespace blink | 160 } // namespace blink |
| OLD | NEW |