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

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

Issue 216523002: Oilpan: Replace most of RefPtrs for Event objects with oilpan's transition types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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
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 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 * 29 *
30 */ 30 */
31 31
32 #ifndef EventTarget_h 32 #ifndef EventTarget_h
33 #define EventTarget_h 33 #define EventTarget_h
34 34
35 #include "core/events/EventListenerMap.h" 35 #include "core/events/EventListenerMap.h"
36 #include "core/events/ThreadLocalEventNames.h" 36 #include "core/events/ThreadLocalEventNames.h"
37 #include "heap/Handle.h"
37 #include "wtf/Forward.h" 38 #include "wtf/Forward.h"
38 39
39 namespace WebCore { 40 namespace WebCore {
40 41
41 class ApplicationCache; 42 class ApplicationCache;
42 class AudioContext; 43 class AudioContext;
43 class DOMWindow; 44 class DOMWindow;
44 class DedicatedWorkerGlobalScope; 45 class DedicatedWorkerGlobalScope;
45 class Event; 46 class Event;
46 class EventListener; 47 class EventListener;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // FIXME: first 2 args to addEventListener and removeEventListener should 111 // FIXME: first 2 args to addEventListener and removeEventListener should
111 // be required (per spec), but throwing TypeError breaks legacy content. 112 // be required (per spec), but throwing TypeError breaks legacy content.
112 // http://crbug.com/353484 113 // http://crbug.com/353484
113 bool addEventListener() { return false; } 114 bool addEventListener() { return false; }
114 bool addEventListener(const AtomicString& eventType) { return false; } 115 bool addEventListener(const AtomicString& eventType) { return false; }
115 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even tListener>, bool useCapture = false); 116 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even tListener>, bool useCapture = false);
116 bool removeEventListener() { return false; } 117 bool removeEventListener() { return false; }
117 bool removeEventListener(const AtomicString& eventType) { return false; } 118 bool removeEventListener(const AtomicString& eventType) { return false; }
118 virtual bool removeEventListener(const AtomicString& eventType, EventListene r*, bool useCapture = false); 119 virtual bool removeEventListener(const AtomicString& eventType, EventListene r*, bool useCapture = false);
119 virtual void removeAllEventListeners(); 120 virtual void removeAllEventListeners();
120 virtual bool dispatchEvent(PassRefPtr<Event>); 121 virtual bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>);
121 bool dispatchEvent(PassRefPtr<Event>, ExceptionState&); // DOM API 122 bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>, ExceptionState&); // DOM A PI
122 virtual void uncaughtExceptionInEventHandler(); 123 virtual void uncaughtExceptionInEventHandler();
123 124
124 // Used for legacy "onEvent" attribute APIs. 125 // Used for legacy "onEvent" attribute APIs.
125 bool setAttributeEventListener(const AtomicString& eventType, PassRefPtr<Eve ntListener>); 126 bool setAttributeEventListener(const AtomicString& eventType, PassRefPtr<Eve ntListener>);
126 EventListener* getAttributeEventListener(const AtomicString& eventType); 127 EventListener* getAttributeEventListener(const AtomicString& eventType);
127 128
128 bool hasEventListeners() const; 129 bool hasEventListeners() const;
129 bool hasEventListeners(const AtomicString& eventType) const; 130 bool hasEventListeners(const AtomicString& eventType) const;
130 bool hasCapturingEventListeners(const AtomicString& eventType); 131 bool hasCapturingEventListeners(const AtomicString& eventType);
131 const EventListenerVector& getEventListeners(const AtomicString& eventType); 132 const EventListenerVector& getEventListeners(const AtomicString& eventType);
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 virtual void refEventTarget() OVERRIDE FINAL { ref(); } \ 243 virtual void refEventTarget() OVERRIDE FINAL { ref(); } \
243 virtual void derefEventTarget() OVERRIDE FINAL { deref(); } \ 244 virtual void derefEventTarget() OVERRIDE FINAL { deref(); } \
244 typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro 245 typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro
245 246
246 // Use this macro if your EventTarget subclass is also a subclass of WTF::RefCou nted. 247 // Use this macro if your EventTarget subclass is also a subclass of WTF::RefCou nted.
247 // A ref-counted class that uses a different method of refcounting should use DE FINE_EVENT_TARGET_REFCOUNTING directly. 248 // A ref-counted class that uses a different method of refcounting should use DE FINE_EVENT_TARGET_REFCOUNTING directly.
248 // Both of these macros are meant to be placed just before the "public:" section of the class declaration. 249 // Both of these macros are meant to be placed just before the "public:" section of the class declaration.
249 #define REFCOUNTED_EVENT_TARGET(className) DEFINE_EVENT_TARGET_REFCOUNTING(RefCo unted<className>) 250 #define REFCOUNTED_EVENT_TARGET(className) DEFINE_EVENT_TARGET_REFCOUNTING(RefCo unted<className>)
250 251
251 #endif // EventTarget_h 252 #endif // EventTarget_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698