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

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

Issue 478243002: bindings: Adds virtual ScriptWrappable::wrap method. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 3 months 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/events/Event.cpp ('k') | Source/core/events/FocusEvent.h » ('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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // doing so. 91 // doing so.
92 // - Override EventTarget::interfaceName() and executionContext(). The former 92 // - Override EventTarget::interfaceName() and executionContext(). The former
93 // will typically return EventTargetNames::YourClassName. The latter will 93 // will typically return EventTargetNames::YourClassName. The latter will
94 // return ActiveDOMObject::executionContext (if you are an ActiveDOMObject) 94 // return ActiveDOMObject::executionContext (if you are an ActiveDOMObject)
95 // or the document you're in. 95 // or the document you're in.
96 // - Your trace() method will need to call EventTargetWithInlineData::trace. 96 // - Your trace() method will need to call EventTargetWithInlineData::trace.
97 // 97 //
98 // Optionally, add a FooEvent.idl class, but that's outside the scope of this 98 // Optionally, add a FooEvent.idl class, but that's outside the scope of this
99 // comment (and much more straightforward). 99 // comment (and much more straightforward).
100 class EventTarget : public WillBeGarbageCollectedMixin, public ScriptWrappable { 100 class EventTarget : public WillBeGarbageCollectedMixin, public ScriptWrappable {
101 DEFINE_WRAPPERTYPEINFO();
101 public: 102 public:
102 #if !ENABLE(OILPAN) 103 #if !ENABLE(OILPAN)
103 void ref() { refEventTarget(); } 104 void ref() { refEventTarget(); }
104 void deref() { derefEventTarget(); } 105 void deref() { derefEventTarget(); }
105 #endif 106 #endif
106 107
107 virtual const AtomicString& interfaceName() const = 0; 108 virtual const AtomicString& interfaceName() const = 0;
108 virtual ExecutionContext* executionContext() const = 0; 109 virtual ExecutionContext* executionContext() const = 0;
109 110
110 virtual Node* toNode(); 111 virtual Node* toNode();
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro 265 typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro
265 #define DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(baseClass) DEFINE_EVENT_ TARGET_REFCOUNTING(baseClass) 266 #define DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(baseClass) DEFINE_EVENT_ TARGET_REFCOUNTING(baseClass)
266 #endif 267 #endif
267 268
268 // Use this macro if your EventTarget subclass is also a subclass of WTF::RefCou nted. 269 // Use this macro if your EventTarget subclass is also a subclass of WTF::RefCou nted.
269 // A ref-counted class that uses a different method of refcounting should use DE FINE_EVENT_TARGET_REFCOUNTING directly. 270 // A ref-counted class that uses a different method of refcounting should use DE FINE_EVENT_TARGET_REFCOUNTING directly.
270 // Both of these macros are meant to be placed just before the "public:" section of the class declaration. 271 // Both of these macros are meant to be placed just before the "public:" section of the class declaration.
271 #define REFCOUNTED_EVENT_TARGET(className) DEFINE_EVENT_TARGET_REFCOUNTING_WILL_ BE_REMOVED(RefCounted<className>) 272 #define REFCOUNTED_EVENT_TARGET(className) DEFINE_EVENT_TARGET_REFCOUNTING_WILL_ BE_REMOVED(RefCounted<className>)
272 273
273 #endif // EventTarget_h 274 #endif // EventTarget_h
OLDNEW
« no previous file with comments | « Source/core/events/Event.cpp ('k') | Source/core/events/FocusEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698