OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) | |
3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) | |
4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | |
5 * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. | |
6 * | |
7 * This library is free software; you can redistribute it and/or | |
8 * modify it under the terms of the GNU Library General Public | |
9 * License as published by the Free Software Foundation; either | |
10 * version 2 of the License, or (at your option) any later version. | |
11 * | |
12 * This library is distributed in the hope that it will be useful, | |
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 * Library General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU Library General Public License | |
18 * along with this library; see the file COPYING.LIB. If not, write to | |
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |
20 * Boston, MA 02110-1301, USA. | |
21 * | |
22 */ | |
23 | |
24 #ifndef RelatedEvent_h | |
25 #define RelatedEvent_h | |
26 | |
27 #include "core/events/Event.h" | |
28 | |
29 namespace WebCore { | |
30 | |
31 struct RelatedEventInit : public EventInit { | |
32 RelatedEventInit(); | |
33 RefPtr<EventTarget> relatedTarget; | |
34 }; | |
35 | |
36 class RelatedEvent : public Event { | |
esprehn
2014/05/20 05:51:34
FINAL
pals
2014/05/21 07:55:12
Done.
| |
37 public: | |
38 | |
esprehn
2014/05/20 05:51:34
no new line after sections
pals
2014/05/21 07:55:12
Done.
| |
39 static PassRefPtr<RelatedEvent> create() | |
esprehn
2014/05/20 05:51:34
This method doesn't make sense, what's the type of
pals
2014/05/21 07:55:12
This is needed here
https://code.google.com/p/chro
| |
40 { | |
41 return adoptRef(new RelatedEvent); | |
42 } | |
43 | |
44 static PassRefPtr<RelatedEvent> create(const AtomicString& eventType); | |
45 static PassRefPtr<RelatedEvent> create(const AtomicString& eventType, const RelatedEventInit&); | |
46 | |
47 virtual ~RelatedEvent(); | |
48 | |
49 EventTarget* relatedTarget() const { return m_relatedTarget.get(); } | |
50 EventTarget* relatedTarget(bool& isNull) const { isNull = !m_relatedTarget; return m_relatedTarget.get(); } | |
51 void setRelatedTarget(PassRefPtr<EventTarget> relatedTarget) { m_relatedTarg et = relatedTarget; } | |
52 | |
53 | |
54 virtual const AtomicString& interfaceName() const OVERRIDE; | |
55 bool isRelatedEvent() const; | |
56 | |
57 | |
58 protected: | |
59 | |
esprehn
2014/05/20 05:51:34
no new line.
pals
2014/05/21 07:55:12
Done.
| |
60 RelatedEvent(); | |
61 RelatedEvent(const AtomicString& type); | |
62 RelatedEvent(const AtomicString& type, const RelatedEventInit&); | |
63 | |
64 private: | |
65 RefPtr<EventTarget> m_relatedTarget; | |
66 }; | |
67 | |
68 DEFINE_EVENT_TYPE_CASTS(RelatedEvent); | |
69 | |
70 } // namespace WebCore | |
71 | |
72 #endif // RelatedEvent_h | |
OLD | NEW |