| Index: third_party/WebKit/Source/modules/vr/NavigatorVR.cpp
|
| diff --git a/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp b/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp
|
| index 77a2f29dbdca2c5928e3e40c474af6430de2a556..8cd6fbfdb7eb9db3189bf38d5dd5dd39f52a7734 100644
|
| --- a/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp
|
| +++ b/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp
|
| @@ -123,9 +123,11 @@ void NavigatorVR::dispatchVRGestureEvent(VRDisplayEvent* event) {
|
| }
|
|
|
| void NavigatorVR::pageVisibilityChanged() {
|
| + VLOG(1) << __FUNCTION__;
|
| if (!page())
|
| return;
|
| if (m_controller) {
|
| + VLOG(1) << __FUNCTION__ << ": isPageVisible=" << page()->isPageVisible() << " m_listeningForActivate=" << m_listeningForActivate;
|
| m_controller->setListeningForActivate(page()->isPageVisible() &&
|
| m_listeningForActivate);
|
| }
|
| @@ -133,6 +135,7 @@ void NavigatorVR::pageVisibilityChanged() {
|
|
|
| void NavigatorVR::didAddEventListener(LocalDOMWindow* window,
|
| const AtomicString& eventType) {
|
| + VLOG(1) << __FUNCTION__ << ": eventType=" << eventType;
|
| if (eventType == EventTypeNames::vrdisplayactivate) {
|
| controller()->setListeningForActivate(true);
|
| m_listeningForActivate = true;
|
| @@ -145,6 +148,7 @@ void NavigatorVR::didAddEventListener(LocalDOMWindow* window,
|
|
|
| void NavigatorVR::didRemoveEventListener(LocalDOMWindow* window,
|
| const AtomicString& eventType) {
|
| + VLOG(1) << __FUNCTION__ << ": eventType=" << eventType;
|
| if (eventType == EventTypeNames::vrdisplayactivate &&
|
| !window->hasEventListeners(EventTypeNames::vrdisplayactivate)) {
|
| controller()->setListeningForActivate(false);
|
| @@ -153,6 +157,7 @@ void NavigatorVR::didRemoveEventListener(LocalDOMWindow* window,
|
| }
|
|
|
| void NavigatorVR::didRemoveAllEventListeners(LocalDOMWindow* window) {
|
| + VLOG(1) << __FUNCTION__;
|
| if (m_controller) {
|
| m_controller->setListeningForActivate(false);
|
| m_listeningForActivate = false;
|
|
|