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

Side by Side Diff: Source/core/events/ClipboardEvent.h

Issue 797583002: [bindings] Avoid using custom bindings for handling clipboardData on Event idl interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed the UsageCounter related stuff. Created 6 years 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
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/events/ClipboardEvent.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/events/Event.h" 28 #include "core/events/Event.h"
28 29
29 namespace blink { 30 namespace blink {
30 31
31 class DataTransfer;
32
33 class ClipboardEvent final : public Event { 32 class ClipboardEvent final : public Event {
33 DEFINE_WRAPPERTYPEINFO();
34 public: 34 public:
35 virtual ~ClipboardEvent(); 35 virtual ~ClipboardEvent();
36 static PassRefPtrWillBeRawPtr<ClipboardEvent> create()
37 {
38 return adoptRefWillBeNoop(new ClipboardEvent());
39 }
36 40
37 static PassRefPtrWillBeRawPtr<ClipboardEvent> create(const AtomicString& typ e, bool canBubble, bool cancelable, PassRefPtrWillBeRawPtr<DataTransfer> dataTra nsfer) 41 static PassRefPtrWillBeRawPtr<ClipboardEvent> create(const AtomicString& typ e, bool canBubble, bool cancelable, PassRefPtrWillBeRawPtr<DataTransfer> dataTra nsfer)
38 { 42 {
39 return adoptRefWillBeNoop(new ClipboardEvent(type, canBubble, cancelable , dataTransfer)); 43 return adoptRefWillBeNoop(new ClipboardEvent(type, canBubble, cancelable , dataTransfer));
40 } 44 }
41 45
42 DataTransfer* clipboardData() const { return m_clipboardData.get(); } 46 DataTransfer* clipboardData() const { return m_clipboardData.get(); }
43 47
44 virtual void trace(Visitor*) override; 48 virtual void trace(Visitor*) override;
45 49
46 private: 50 private:
47 ClipboardEvent(); 51 ClipboardEvent();
48 ClipboardEvent(const AtomicString& type, bool canBubble, bool cancelable, Pa ssRefPtrWillBeRawPtr<DataTransfer> clipboardData); 52 ClipboardEvent(const AtomicString& type, bool canBubble, bool cancelable, Pa ssRefPtrWillBeRawPtr<DataTransfer> clipboardData);
49 53
50 virtual const AtomicString& interfaceName() const override; 54 virtual const AtomicString& interfaceName() const override;
51 virtual bool isClipboardEvent() const override; 55 virtual bool isClipboardEvent() const override;
52 56
53 RefPtrWillBeMember<DataTransfer> m_clipboardData; 57 RefPtrWillBeMember<DataTransfer> m_clipboardData;
54 }; 58 };
55 59
56 } // namespace blink 60 } // namespace blink
57 61
58 #endif // ClipboardEvent_h 62 #endif // ClipboardEvent_h
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/events/ClipboardEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698