OLD | NEW |
| (Empty) |
1 // Copyright 2014 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 RelatedEvent_h | |
6 #define RelatedEvent_h | |
7 | |
8 #include "core/events/Event.h" | |
9 #include "core/events/RelatedEventInit.h" | |
10 | |
11 namespace blink { | |
12 | |
13 class RelatedEvent final : public Event { | |
14 DEFINE_WRAPPERTYPEINFO(); | |
15 | |
16 public: | |
17 static RelatedEvent* Create(const AtomicString& type, | |
18 bool can_bubble, | |
19 bool cancelable, | |
20 EventTarget* related_target); | |
21 static RelatedEvent* Create(const AtomicString& event_type, | |
22 const RelatedEventInit&); | |
23 | |
24 ~RelatedEvent() override; | |
25 | |
26 EventTarget* relatedTarget() const { return related_target_.Get(); } | |
27 | |
28 const AtomicString& InterfaceName() const override { | |
29 return EventNames::RelatedEvent; | |
30 } | |
31 bool IsRelatedEvent() const override { return true; } | |
32 | |
33 DECLARE_VIRTUAL_TRACE(); | |
34 | |
35 private: | |
36 RelatedEvent(const AtomicString& type, | |
37 bool can_bubble, | |
38 bool cancelable, | |
39 EventTarget*); | |
40 RelatedEvent(const AtomicString& type, const RelatedEventInit&); | |
41 | |
42 Member<EventTarget> related_target_; | |
43 }; | |
44 | |
45 DEFINE_EVENT_TYPE_CASTS(RelatedEvent); | |
46 | |
47 } // namespace blink | |
48 | |
49 #endif // RelatedEvent_h | |
OLD | NEW |