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

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

Issue 2534543002: VRDisplay inherits from EventTarget (Closed)
Patch Set: Fix destroy Created 4 years 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/VRDisplay.h
diff --git a/third_party/WebKit/Source/modules/vr/VRDisplay.h b/third_party/WebKit/Source/modules/vr/VRDisplay.h
index 45fa373749a3e09edda7789103eb97f8031e4e75..6f903bf035f1057244c1872605fc3921beca9d54 100644
--- a/third_party/WebKit/Source/modules/vr/VRDisplay.h
+++ b/third_party/WebKit/Source/modules/vr/VRDisplay.h
@@ -5,9 +5,9 @@
#ifndef VRDisplay_h
#define VRDisplay_h
-#include "bindings/core/v8/ScriptWrappable.h"
#include "core/dom/Document.h"
#include "core/dom/FrameRequestCallback.h"
+#include "core/events/EventTarget.h"
#include "device/vr/vr_service.mojom-blink.h"
#include "modules/vr/VRDisplayCapabilities.h"
#include "modules/vr/VRLayer.h"
@@ -38,10 +38,12 @@ class WebGLRenderingContextBase;
enum VREye { VREyeNone, VREyeLeft, VREyeRight };
-class VRDisplay final : public GarbageCollectedFinalized<VRDisplay>,
- public device::mojom::blink::VRDisplayClient,
- public ScriptWrappable {
+class VRDisplay final : public EventTargetWithInlineData,
+ public ActiveScriptWrappable,
+ public ContextLifecycleObserver,
+ public device::mojom::blink::VRDisplayClient {
DEFINE_WRAPPERTYPEINFO();
+ USING_GARBAGE_COLLECTED_MIXIN(VRDisplay);
USING_PRE_FINALIZER(VRDisplay, dispose);
public:
@@ -81,6 +83,16 @@ class VRDisplay final : public GarbageCollectedFinalized<VRDisplay>,
Document* document();
+ // EventTarget overrides:
+ ExecutionContext* getExecutionContext() const override;
+ const AtomicString& interfaceName() const override;
+
+ // ContextLifecycleObserver implementation.
+ void contextDestroyed() override;
+
+ // ScriptWrappable implementation.
+ bool hasPendingActivity() const final;
+
DECLARE_VIRTUAL_TRACE();
protected:

Powered by Google App Engine
This is Rietveld 408576698