| Index: third_party/WebKit/Source/modules/vr/NavigatorVR.h
|
| diff --git a/third_party/WebKit/Source/modules/vr/NavigatorVR.h b/third_party/WebKit/Source/modules/vr/NavigatorVR.h
|
| index a4d5a38b16ef9a72b3b8683dacb840f3d939dfaf..dfe54720c8f93d2cfb3a5fc860ddd0da94e6f462 100644
|
| --- a/third_party/WebKit/Source/modules/vr/NavigatorVR.h
|
| +++ b/third_party/WebKit/Source/modules/vr/NavigatorVR.h
|
| @@ -8,7 +8,7 @@
|
| #include "bindings/core/v8/ScriptPromise.h"
|
| #include "core/frame/LocalDOMWindow.h"
|
| #include "core/frame/Navigator.h"
|
| -#include "core/page/PageVisibilityObserver.h"
|
| +#include "core/page/FocusChangedObserver.h"
|
| #include "modules/ModulesExport.h"
|
| #include "modules/vr/VRDisplay.h"
|
| #include "modules/vr/VRDisplayEvent.h"
|
| @@ -26,8 +26,8 @@ class VRController;
|
| class MODULES_EXPORT NavigatorVR final
|
| : public GarbageCollectedFinalized<NavigatorVR>,
|
| public Supplement<Navigator>,
|
| - public PageVisibilityObserver,
|
| - public LocalDOMWindow::EventListenerObserver {
|
| + public LocalDOMWindow::EventListenerObserver,
|
| + public FocusChangedObserver {
|
| USING_GARBAGE_COLLECTED_MIXIN(NavigatorVR);
|
| WTF_MAKE_NONCOPYABLE(NavigatorVR);
|
|
|
| @@ -41,6 +41,7 @@ class MODULES_EXPORT NavigatorVR final
|
|
|
| VRController* controller();
|
| Document* document();
|
| + bool isFocused() { return m_focused; }
|
|
|
| // Queues up event to be fired soon.
|
| void enqueueVREvent(VRDisplayEvent*);
|
| @@ -48,8 +49,8 @@ class MODULES_EXPORT NavigatorVR final
|
| // Dispatches a user gesture event immediately.
|
| void dispatchVRGestureEvent(VRDisplayEvent*);
|
|
|
| - // Inherited from PageVisibilityObserver.
|
| - void pageVisibilityChanged() override;
|
| + // Inherited from FocusChangedObserver.
|
| + void focusedFrameChanged() override;
|
|
|
| // Inherited from LocalDOMWindow::EventListenerObserver.
|
| void didAddEventListener(LocalDOMWindow*, const AtomicString&) override;
|
| @@ -72,6 +73,7 @@ class MODULES_EXPORT NavigatorVR final
|
|
|
| // Whether this page is listening for vrdisplayactivate event.
|
| bool m_listeningForActivate = false;
|
| + bool m_focused = false;
|
| };
|
|
|
| } // namespace blink
|
|
|