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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 virtual const AtomicString& interfaceName() const = 0; | 82 virtual const AtomicString& interfaceName() const = 0; |
83 virtual ExecutionContext* executionContext() const = 0; | 83 virtual ExecutionContext* executionContext() const = 0; |
84 | 84 |
85 virtual Node* toNode(); | 85 virtual Node* toNode(); |
86 virtual DOMWindow* toDOMWindow(); | 86 virtual DOMWindow* toDOMWindow(); |
87 virtual MessagePort* toMessagePort(); | 87 virtual MessagePort* toMessagePort(); |
88 | 88 |
89 // FIXME: first 2 args to addEventListener and removeEventListener should | 89 // FIXME: first 2 args to addEventListener and removeEventListener should |
90 // be required (per spec), but throwing TypeError breaks legacy content. | 90 // be required (per spec), but throwing TypeError breaks legacy content. |
91 // http://crbug.com/353484 | 91 // http://crbug.com/353484 |
| 92 // FIXME: default values should be specified in IDL, not C++ |
| 93 // http://crbug.com/258153 |
92 bool addEventListener() { return false; } | 94 bool addEventListener() { return false; } |
93 bool addEventListener(const AtomicString& eventType) { return false; } | 95 bool addEventListener(const AtomicString& eventType) { return false; } |
94 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even
tListener>, bool useCapture = false); | 96 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even
tListener>, bool useCapture = false); |
95 bool removeEventListener() { return false; } | 97 bool removeEventListener() { return false; } |
96 bool removeEventListener(const AtomicString& eventType) { return false; } | 98 bool removeEventListener(const AtomicString& eventType) { return false; } |
97 virtual bool removeEventListener(const AtomicString& eventType, EventListene
r*, bool useCapture = false); | 99 virtual bool removeEventListener(const AtomicString& eventType, EventListene
r*, bool useCapture = false); |
98 virtual void removeAllEventListeners(); | 100 virtual void removeAllEventListeners(); |
99 virtual bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>); | 101 virtual bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>); |
100 bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>, ExceptionState&); // DOM A
PI | 102 bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>, ExceptionState&); // DOM A
PI |
101 virtual void uncaughtExceptionInEventHandler(); | 103 virtual void uncaughtExceptionInEventHandler(); |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro | 238 typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro |
237 #define DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(baseClass) DEFINE_EVENT_
TARGET_REFCOUNTING(baseClass) | 239 #define DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(baseClass) DEFINE_EVENT_
TARGET_REFCOUNTING(baseClass) |
238 #endif | 240 #endif |
239 | 241 |
240 // Use this macro if your EventTarget subclass is also a subclass of WTF::RefCou
nted. | 242 // Use this macro if your EventTarget subclass is also a subclass of WTF::RefCou
nted. |
241 // A ref-counted class that uses a different method of refcounting should use DE
FINE_EVENT_TARGET_REFCOUNTING directly. | 243 // A ref-counted class that uses a different method of refcounting should use DE
FINE_EVENT_TARGET_REFCOUNTING directly. |
242 // Both of these macros are meant to be placed just before the "public:" section
of the class declaration. | 244 // Both of these macros are meant to be placed just before the "public:" section
of the class declaration. |
243 #define REFCOUNTED_EVENT_TARGET(className) DEFINE_EVENT_TARGET_REFCOUNTING(RefCo
untedWillBeRefCountedGarbageCollected<className>) | 245 #define REFCOUNTED_EVENT_TARGET(className) DEFINE_EVENT_TARGET_REFCOUNTING(RefCo
untedWillBeRefCountedGarbageCollected<className>) |
244 | 246 |
245 #endif // EventTarget_h | 247 #endif // EventTarget_h |
OLD | NEW |