OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) | 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) |
3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) | 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) |
4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv
ed. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
11 * | 11 * |
12 * This library is distributed in the hope that it will be useful, | 12 * This library is distributed in the hope that it will be useful, |
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 * Library General Public License for more details. | 15 * Library General Public License for more details. |
16 * | 16 * |
17 * You should have received a copy of the GNU Library General Public License | 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 | 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, | 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
20 * Boston, MA 02110-1301, USA. | 20 * Boston, MA 02110-1301, USA. |
21 * | 21 * |
22 */ | 22 */ |
23 | 23 |
24 #ifndef ClipboardEvent_h | 24 #ifndef ClipboardEvent_h |
25 #define ClipboardEvent_h | 25 #define ClipboardEvent_h |
26 | 26 |
27 #include "core/clipboard/DataTransfer.h" | 27 #include "core/clipboard/DataTransfer.h" |
| 28 #include "core/events/ClipboardEventInit.h" |
28 #include "core/events/Event.h" | 29 #include "core/events/Event.h" |
29 | 30 |
30 namespace blink { | 31 namespace blink { |
31 | 32 |
32 class ClipboardEvent final : public Event { | 33 class ClipboardEvent final : public Event { |
33 DEFINE_WRAPPERTYPEINFO(); | 34 DEFINE_WRAPPERTYPEINFO(); |
34 public: | 35 public: |
35 virtual ~ClipboardEvent(); | 36 virtual ~ClipboardEvent(); |
36 static PassRefPtrWillBeRawPtr<ClipboardEvent> create() | 37 static PassRefPtrWillBeRawPtr<ClipboardEvent> create() |
37 { | 38 { |
38 return adoptRefWillBeNoop(new ClipboardEvent()); | 39 return adoptRefWillBeNoop(new ClipboardEvent()); |
39 } | 40 } |
40 | 41 |
41 static PassRefPtrWillBeRawPtr<ClipboardEvent> create(const AtomicString& typ
e, bool canBubble, bool cancelable, DataTransfer* dataTransfer) | 42 static PassRefPtrWillBeRawPtr<ClipboardEvent> create(const AtomicString& typ
e, bool canBubble, bool cancelable, DataTransfer* dataTransfer) |
42 { | 43 { |
43 return adoptRefWillBeNoop(new ClipboardEvent(type, canBubble, cancelable
, dataTransfer)); | 44 return adoptRefWillBeNoop(new ClipboardEvent(type, canBubble, cancelable
, dataTransfer)); |
44 } | 45 } |
45 | 46 |
| 47 static PassRefPtrWillBeRawPtr<ClipboardEvent> create(const AtomicString& typ
e, const ClipboardEventInit& initializer) |
| 48 { |
| 49 return adoptRefWillBeNoop(new ClipboardEvent(type, initializer)); |
| 50 } |
| 51 |
46 DataTransfer* clipboardData() const { return m_clipboardData.get(); } | 52 DataTransfer* clipboardData() const { return m_clipboardData.get(); } |
47 | 53 |
48 DECLARE_VIRTUAL_TRACE(); | 54 DECLARE_VIRTUAL_TRACE(); |
49 | 55 |
50 private: | 56 private: |
51 ClipboardEvent(); | 57 ClipboardEvent(); |
52 ClipboardEvent(const AtomicString& type, bool canBubble, bool cancelable, Da
taTransfer* clipboardData); | 58 ClipboardEvent(const AtomicString& type, bool canBubble, bool cancelable, Da
taTransfer* clipboardData); |
| 59 ClipboardEvent(const AtomicString& type, const ClipboardEventInit&); |
53 | 60 |
54 virtual const AtomicString& interfaceName() const override; | 61 virtual const AtomicString& interfaceName() const override; |
55 virtual bool isClipboardEvent() const override; | 62 virtual bool isClipboardEvent() const override; |
56 | 63 |
57 PersistentWillBeMember<DataTransfer> m_clipboardData; | 64 PersistentWillBeMember<DataTransfer> m_clipboardData; |
58 }; | 65 }; |
59 | 66 |
60 } // namespace blink | 67 } // namespace blink |
61 | 68 |
62 #endif // ClipboardEvent_h | 69 #endif // ClipboardEvent_h |
OLD | NEW |