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

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

Issue 329223004: [DeprecateAs] if call addEventListener or removeEventListener without enough arguments Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix template condition Created 6 years, 6 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/bindings/templates/methods.cpp ('k') | Source/core/events/EventTarget.idl » ('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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 LocalDOMWindow* toDOMWindow(); 86 virtual LocalDOMWindow* 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
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
OLDNEW
« no previous file with comments | « Source/bindings/templates/methods.cpp ('k') | Source/core/events/EventTarget.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698