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

Unified Diff: third_party/WebKit/Source/modules/vr/NavigatorVR.h

Issue 2510993002: Notify VRDeviceProviders when there are pages listening for vrdisplayactivate (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/vr/vr_service_impl.cc ('k') | third_party/WebKit/Source/modules/vr/NavigatorVR.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0c1b3926abeec504ea9bfed4b347898195933cf3..b023345f89a5c6f5aa27f291f595be79dcd9fb9a 100644
--- a/third_party/WebKit/Source/modules/vr/NavigatorVR.h
+++ b/third_party/WebKit/Source/modules/vr/NavigatorVR.h
@@ -7,6 +7,7 @@
#include "bindings/core/v8/ScriptPromise.h"
#include "core/frame/DOMWindowProperty.h"
+#include "core/frame/LocalDOMWindow.h"
#include "modules/ModulesExport.h"
#include "modules/vr/VRDisplay.h"
#include "modules/vr/VRDisplayEvent.h"
@@ -24,7 +25,8 @@ class VRController;
class MODULES_EXPORT NavigatorVR final
: public GarbageCollectedFinalized<NavigatorVR>,
public Supplement<Navigator>,
- public DOMWindowProperty {
+ public DOMWindowProperty,
+ public LocalDOMWindow::EventListenerObserver {
USING_GARBAGE_COLLECTED_MIXIN(NavigatorVR);
WTF_MAKE_NONCOPYABLE(NavigatorVR);
@@ -45,6 +47,11 @@ class MODULES_EXPORT NavigatorVR final
// Dispatches a user gesture event immediately.
void dispatchVRGestureEvent(VRDisplayEvent*);
+ // Inherited from LocalDOMWindow::EventListenerObserver.
+ void didAddEventListener(LocalDOMWindow*, const AtomicString&) override;
+ void didRemoveEventListener(LocalDOMWindow*, const AtomicString&) override;
+ void didRemoveAllEventListeners(LocalDOMWindow*) override;
+
DECLARE_VIRTUAL_TRACE();
private:
« no previous file with comments | « device/vr/vr_service_impl.cc ('k') | third_party/WebKit/Source/modules/vr/NavigatorVR.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698