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

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

Issue 2317483002: Add support of vrdisplayconnect and vrdisplaydisconnect event (Closed)
Patch Set: Address most comments from bajones@ 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 side-by-side diff with in-line comments
Download patch
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 4a4b2a3e8d64dfeeb5a4d6bbd9d50ad63cab8297..7b1662ab596bc5a1f3a3525ae54453ac67a38aae 100644
--- a/third_party/WebKit/Source/modules/vr/NavigatorVR.h
+++ b/third_party/WebKit/Source/modules/vr/NavigatorVR.h
@@ -10,6 +10,7 @@
#include "modules/ModulesExport.h"
#include "modules/vr/VRDisplay.h"
#include "modules/vr/VRDisplayEvent.h"
+#include "platform/AsyncMethodRunner.h"
#include "platform/Supplementable.h"
#include "platform/heap/Handle.h"
#include "public/platform/WebVector.h"
@@ -35,6 +36,8 @@ public:
VRController* controller();
Document* document();
+ void fireVREvent(VRDisplayEvent*);
+
DECLARE_VIRTUAL_TRACE();
private:
@@ -47,7 +50,14 @@ private:
void fireVRDisplayPresentChange(VRDisplay*);
+ void dispatchOneEvent();
+
+ bool isVREvent(const AtomicString&);
+
Member<VRController> m_controller;
+ bool m_hasEventListener;
+ HeapDeque<Member<VRDisplayEvent>> m_pendingEvents;
+ Member<AsyncMethodRunner<NavigatorVR>> m_dispatchOneEventRunner;
bajones 2016/09/09 05:53:00 Looks like the only change actually needed in this
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698