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

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

Issue 1922093003: Add AddEventListenerOptions addEventListenerOptions interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 virtual const AtomicString& interfaceName() const = 0; 107 virtual const AtomicString& interfaceName() const = 0;
108 virtual ExecutionContext* getExecutionContext() const = 0; 108 virtual ExecutionContext* getExecutionContext() const = 0;
109 109
110 virtual Node* toNode(); 110 virtual Node* toNode();
111 virtual const DOMWindow* toDOMWindow() const; 111 virtual const DOMWindow* toDOMWindow() const;
112 virtual const LocalDOMWindow* toLocalDOMWindow() const; 112 virtual const LocalDOMWindow* toLocalDOMWindow() const;
113 virtual LocalDOMWindow* toLocalDOMWindow(); 113 virtual LocalDOMWindow* toLocalDOMWindow();
114 virtual MessagePort* toMessagePort(); 114 virtual MessagePort* toMessagePort();
115 115
116 bool addEventListener(const AtomicString& eventType, EventListener*, bool us eCapture = false); 116 bool addEventListener(const AtomicString& eventType, EventListener*, bool us eCapture = false);
117 bool addEventListener(const AtomicString& eventType, EventListener*, const E ventListenerOptionsOrBoolean&); 117 bool addEventListener(const AtomicString& eventType, EventListener*, const A ddEventListenerOptionsOrBoolean&);
118 bool addEventListener(const AtomicString& eventType, EventListener*, EventLi stenerOptions&); 118 bool addEventListener(const AtomicString& eventType, EventListener*, AddEven tListenerOptions&);
119 119
120 bool removeEventListener(const AtomicString& eventType, const EventListener* , bool useCapture = false); 120 bool removeEventListener(const AtomicString& eventType, const EventListener* , bool useCapture = false);
121 bool removeEventListener(const AtomicString& eventType, const EventListener* , const EventListenerOptionsOrBoolean&); 121 bool removeEventListener(const AtomicString& eventType, const EventListener* , const EventListenerOptionsOrBoolean&);
122 bool removeEventListener(const AtomicString& eventType, const EventListener* , EventListenerOptions&); 122 bool removeEventListener(const AtomicString& eventType, const EventListener* , EventListenerOptions&);
123 virtual void removeAllEventListeners(); 123 virtual void removeAllEventListeners();
124 124
125 DispatchEventResult dispatchEvent(Event*); 125 DispatchEventResult dispatchEvent(Event*);
126 126
127 // dispatchEventForBindings is intended to only be called from 127 // dispatchEventForBindings is intended to only be called from
128 // javascript originated calls. This method will validate and may adjust 128 // javascript originated calls. This method will validate and may adjust
(...skipping 15 matching lines...) Expand all
144 144
145 static DispatchEventResult dispatchEventResult(const Event&); 145 static DispatchEventResult dispatchEventResult(const Event&);
146 146
147 DEFINE_INLINE_VIRTUAL_TRACE() { } 147 DEFINE_INLINE_VIRTUAL_TRACE() { }
148 148
149 virtual bool keepEventInNode(Event*) { return false; } 149 virtual bool keepEventInNode(Event*) { return false; }
150 150
151 protected: 151 protected:
152 EventTarget(); 152 EventTarget();
153 153
154 virtual bool addEventListenerInternal(const AtomicString& eventType, EventLi stener*, const EventListenerOptions&); 154 virtual bool addEventListenerInternal(const AtomicString& eventType, EventLi stener*, const AddEventListenerOptions&);
155 virtual bool removeEventListenerInternal(const AtomicString& eventType, cons t EventListener*, const EventListenerOptions&); 155 virtual bool removeEventListenerInternal(const AtomicString& eventType, cons t EventListener*, const EventListenerOptions&);
156 156
157 // Called when an event listener has been successfully added. 157 // Called when an event listener has been successfully added.
158 virtual void addedEventListener(const AtomicString& eventType, RegisteredEve ntListener&); 158 virtual void addedEventListener(const AtomicString& eventType, RegisteredEve ntListener&);
159 159
160 // Called when an event listener is removed. The original registration param eters of this 160 // Called when an event listener is removed. The original registration param eters of this
161 // event listener are available to be queried. 161 // event listener are available to be queried.
162 virtual void removedEventListener(const AtomicString& eventType, const Regis teredEventListener&); 162 virtual void removedEventListener(const AtomicString& eventType, const Regis teredEventListener&);
163 163
164 virtual DispatchEventResult dispatchEventInternal(Event*); 164 virtual DispatchEventResult dispatchEventInternal(Event*);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 { 251 {
252 EventTargetData* d = eventTargetData(); 252 EventTargetData* d = eventTargetData();
253 if (!d) 253 if (!d)
254 return false; 254 return false;
255 return d->eventListenerMap.containsCapturing(eventType); 255 return d->eventListenerMap.containsCapturing(eventType);
256 } 256 }
257 257
258 } // namespace blink 258 } // namespace blink
259 259
260 #endif // EventTarget_h 260 #endif // EventTarget_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/EventListenerOptions.idl ('k') | third_party/WebKit/Source/core/events/EventTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698