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

Side by Side Diff: third_party/WebKit/Source/modules/vr/VRDisplayEvent.h

Issue 2505493004: Wired up vrdisplayactivate/deactivate (Closed)
Patch Set: Again with the upstream issues 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef VRDisplayEvent_h 5 #ifndef VRDisplayEvent_h
6 #define VRDisplayEvent_h 6 #define VRDisplayEvent_h
7 7
8 #include "modules/EventModules.h" 8 #include "modules/EventModules.h"
9 #include "modules/vr/VRDisplay.h" 9 #include "modules/vr/VRDisplay.h"
10 #include "modules/vr/VRDisplayEventInit.h" 10 #include "modules/vr/VRDisplayEventInit.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class VRDisplayEvent final : public Event { 14 class VRDisplayEvent final : public Event {
15 DEFINE_WRAPPERTYPEINFO(); 15 DEFINE_WRAPPERTYPEINFO();
16 16
17 public: 17 public:
18 static VRDisplayEvent* create() { return new VRDisplayEvent; } 18 static VRDisplayEvent* create() { return new VRDisplayEvent; }
19 static VRDisplayEvent* create(const AtomicString& type, 19 static VRDisplayEvent* create(const AtomicString& type,
20 bool canBubble, 20 bool canBubble,
21 bool cancelable, 21 bool cancelable,
22 VRDisplay* display, 22 VRDisplay* display,
23 String reason) { 23 String reason) {
24 return new VRDisplayEvent(type, canBubble, cancelable, display, reason); 24 return new VRDisplayEvent(type, canBubble, cancelable, display, reason);
25 } 25 }
26 static VRDisplayEvent* create(const AtomicString& type, 26 static VRDisplayEvent* create(const AtomicString& type,
27 bool canBubble,
28 bool cancelable,
29 VRDisplay*,
30 device::mojom::blink::VRDisplayEventReason);
31
32 static VRDisplayEvent* create(const AtomicString& type,
27 const VRDisplayEventInit& initializer) { 33 const VRDisplayEventInit& initializer) {
28 return new VRDisplayEvent(type, initializer); 34 return new VRDisplayEvent(type, initializer);
29 } 35 }
30 36
31 ~VRDisplayEvent() override; 37 ~VRDisplayEvent() override;
32 38
33 VRDisplay* display() const { return m_display.get(); } 39 VRDisplay* display() const { return m_display.get(); }
34 const String& reason() const { return m_reason; } 40 const String& reason() const { return m_reason; }
35 41
36 const AtomicString& interfaceName() const override; 42 const AtomicString& interfaceName() const override;
37 43
38 DECLARE_VIRTUAL_TRACE(); 44 DECLARE_VIRTUAL_TRACE();
39 45
40 private: 46 private:
41 VRDisplayEvent(); 47 VRDisplayEvent();
42 VRDisplayEvent(const AtomicString& type, 48 VRDisplayEvent(const AtomicString& type,
43 bool canBubble, 49 bool canBubble,
44 bool cancelable, 50 bool cancelable,
45 VRDisplay*, 51 VRDisplay*,
46 String); 52 String);
47 VRDisplayEvent(const AtomicString&, const VRDisplayEventInit&); 53 VRDisplayEvent(const AtomicString&, const VRDisplayEventInit&);
48 54
49 Member<VRDisplay> m_display; 55 Member<VRDisplay> m_display;
50 String m_reason; 56 String m_reason;
51 }; 57 };
52 58
53 } // namespace blink 59 } // namespace blink
54 60
55 #endif // VRDisplayEvent_h 61 #endif // VRDisplayEvent_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/vr/VRDisplay.cpp ('k') | third_party/WebKit/Source/modules/vr/VRDisplayEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698