OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef VRDisplayEvent_h |
| 6 #define VRDisplayEvent_h |
| 7 |
| 8 #include "modules/EventModules.h" |
| 9 #include "modules/vr/VRDisplay.h" |
| 10 #include "modules/vr/VRDisplayEventInit.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class VRDisplayEvent final : public Event { |
| 15 DEFINE_WRAPPERTYPEINFO(); |
| 16 public: |
| 17 static VRDisplayEvent* create() |
| 18 { |
| 19 return new VRDisplayEvent; |
| 20 } |
| 21 static VRDisplayEvent* create(const AtomicString& type, bool canBubble, bool
cancelable, VRDisplay* display, String reason) |
| 22 { |
| 23 return new VRDisplayEvent(type, canBubble, cancelable, display, reason); |
| 24 } |
| 25 static VRDisplayEvent* create(const AtomicString& type, const VRDisplayEvent
Init& initializer) |
| 26 { |
| 27 return new VRDisplayEvent(type, initializer); |
| 28 } |
| 29 |
| 30 ~VRDisplayEvent() override; |
| 31 |
| 32 VRDisplay* display() const { return m_display.get(); } |
| 33 const String& reason() const { return m_reason; } |
| 34 |
| 35 const AtomicString& interfaceName() const override; |
| 36 |
| 37 DECLARE_VIRTUAL_TRACE(); |
| 38 |
| 39 private: |
| 40 VRDisplayEvent(); |
| 41 VRDisplayEvent(const AtomicString& type, bool canBubble, bool cancelable, VR
Display*, String); |
| 42 VRDisplayEvent(const AtomicString&, const VRDisplayEventInit&); |
| 43 |
| 44 Member<VRDisplay> m_display; |
| 45 String m_reason; |
| 46 }; |
| 47 |
| 48 } // namespace blink |
| 49 |
| 50 #endif // VRDisplayEvent_h |
OLD | NEW |