| OLD | NEW |
| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 void ref() { refEventTarget(); } | 100 void ref() { refEventTarget(); } |
| 101 void deref() { derefEventTarget(); } | 101 void deref() { derefEventTarget(); } |
| 102 | 102 |
| 103 virtual const AtomicString& interfaceName() const = 0; | 103 virtual const AtomicString& interfaceName() const = 0; |
| 104 virtual ExecutionContext* executionContext() const = 0; | 104 virtual ExecutionContext* executionContext() const = 0; |
| 105 | 105 |
| 106 virtual Node* toNode(); | 106 virtual Node* toNode(); |
| 107 virtual DOMWindow* toDOMWindow(); | 107 virtual DOMWindow* toDOMWindow(); |
| 108 virtual MessagePort* toMessagePort(); | 108 virtual MessagePort* toMessagePort(); |
| 109 | 109 |
| 110 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even
tListener>, bool useCapture); | 110 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even
tListener>, bool useCapture = false); |
| 111 virtual bool removeEventListener(const AtomicString& eventType, EventListene
r*, bool useCapture); | 111 virtual bool removeEventListener(const AtomicString& eventType, EventListene
r*, bool useCapture = false); |
| 112 virtual void removeAllEventListeners(); | 112 virtual void removeAllEventListeners(); |
| 113 virtual bool dispatchEvent(PassRefPtr<Event>); | 113 virtual bool dispatchEvent(PassRefPtr<Event>); |
| 114 bool dispatchEvent(PassRefPtr<Event>, ExceptionState&); // DOM API | 114 bool dispatchEvent(PassRefPtr<Event>, ExceptionState&); // DOM API |
| 115 virtual void uncaughtExceptionInEventHandler(); | 115 virtual void uncaughtExceptionInEventHandler(); |
| 116 | 116 |
| 117 // Used for legacy "onEvent" attribute APIs. | 117 // Used for legacy "onEvent" attribute APIs. |
| 118 bool setAttributeEventListener(const AtomicString& eventType, PassRefPtr<Eve
ntListener>); | 118 bool setAttributeEventListener(const AtomicString& eventType, PassRefPtr<Eve
ntListener>); |
| 119 EventListener* getAttributeEventListener(const AtomicString& eventType); | 119 EventListener* getAttributeEventListener(const AtomicString& eventType); |
| 120 | 120 |
| 121 bool hasEventListeners() const; | 121 bool hasEventListeners() const; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 virtual void refEventTarget() OVERRIDE FINAL { ref(); } \ | 235 virtual void refEventTarget() OVERRIDE FINAL { ref(); } \ |
| 236 virtual void derefEventTarget() OVERRIDE FINAL { deref(); } \ | 236 virtual void derefEventTarget() OVERRIDE FINAL { deref(); } \ |
| 237 typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro | 237 typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro |
| 238 | 238 |
| 239 // Use this macro if your EventTarget subclass is also a subclass of WTF::RefCou
nted. | 239 // Use this macro if your EventTarget subclass is also a subclass of WTF::RefCou
nted. |
| 240 // A ref-counted class that uses a different method of refcounting should use DE
FINE_EVENT_TARGET_REFCOUNTING directly. | 240 // A ref-counted class that uses a different method of refcounting should use DE
FINE_EVENT_TARGET_REFCOUNTING directly. |
| 241 // Both of these macros are meant to be placed just before the "public:" section
of the class declaration. | 241 // Both of these macros are meant to be placed just before the "public:" section
of the class declaration. |
| 242 #define REFCOUNTED_EVENT_TARGET(className) DEFINE_EVENT_TARGET_REFCOUNTING(RefCo
unted<className>) | 242 #define REFCOUNTED_EVENT_TARGET(className) DEFINE_EVENT_TARGET_REFCOUNTING(RefCo
unted<className>) |
| 243 | 243 |
| 244 #endif // EventTarget_h | 244 #endif // EventTarget_h |
| OLD | NEW |