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

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

Issue 636833002: Replace FINAL and OVERRIDE with their C++11 counterparts in Source/core/events (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « Source/core/events/EventPath.h ('k') | Source/core/events/FocusEvent.h » ('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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 void fireEventListeners(Event*, EventTargetData*, EventListenerVector&); 159 void fireEventListeners(Event*, EventTargetData*, EventListenerVector&);
160 void countLegacyEvents(const AtomicString& legacyTypeName, EventListenerVect or*, EventListenerVector*); 160 void countLegacyEvents(const AtomicString& legacyTypeName, EventListenerVect or*, EventListenerVector*);
161 161
162 bool clearAttributeEventListener(const AtomicString& eventType); 162 bool clearAttributeEventListener(const AtomicString& eventType);
163 163
164 friend class EventListenerIterator; 164 friend class EventListenerIterator;
165 }; 165 };
166 166
167 class EventTargetWithInlineData : public EventTarget { 167 class EventTargetWithInlineData : public EventTarget {
168 protected: 168 protected:
169 virtual EventTargetData* eventTargetData() OVERRIDE FINAL { return &m_eventT argetData; } 169 virtual EventTargetData* eventTargetData() override final { return &m_eventT argetData; }
170 virtual EventTargetData& ensureEventTargetData() OVERRIDE FINAL { return m_e ventTargetData; } 170 virtual EventTargetData& ensureEventTargetData() override final { return m_e ventTargetData; }
171 private: 171 private:
172 EventTargetData m_eventTargetData; 172 EventTargetData m_eventTargetData;
173 }; 173 };
174 174
175 // FIXME: These macros should be split into separate DEFINE and DECLARE 175 // FIXME: These macros should be split into separate DEFINE and DECLARE
176 // macros to avoid causing so many header includes. 176 // macros to avoid causing so many header includes.
177 #define DEFINE_ATTRIBUTE_EVENT_LISTENER(attribute) \ 177 #define DEFINE_ATTRIBUTE_EVENT_LISTENER(attribute) \
178 EventListener* on##attribute() { return getAttributeEventListener(EventTypeN ames::attribute); } \ 178 EventListener* on##attribute() { return getAttributeEventListener(EventTypeN ames::attribute); } \
179 void setOn##attribute(PassRefPtr<EventListener> listener) { setAttributeEven tListener(EventTypeNames::attribute, listener); } \ 179 void setOn##attribute(PassRefPtr<EventListener> listener) { setAttributeEven tListener(EventTypeNames::attribute, listener); } \
180 180
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 using baseClass::deref; \ 251 using baseClass::deref; \
252 private: \ 252 private: \
253 typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro 253 typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro
254 #define DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(baseClass) 254 #define DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(baseClass)
255 #else 255 #else
256 #define DEFINE_EVENT_TARGET_REFCOUNTING(baseClass) \ 256 #define DEFINE_EVENT_TARGET_REFCOUNTING(baseClass) \
257 public: \ 257 public: \
258 using baseClass::ref; \ 258 using baseClass::ref; \
259 using baseClass::deref; \ 259 using baseClass::deref; \
260 private: \ 260 private: \
261 virtual void refEventTarget() OVERRIDE FINAL { ref(); } \ 261 virtual void refEventTarget() override final { ref(); } \
262 virtual void derefEventTarget() OVERRIDE FINAL { deref(); } \ 262 virtual void derefEventTarget() override final { deref(); } \
263 typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro 263 typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro
264 #define DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(baseClass) DEFINE_EVENT_ TARGET_REFCOUNTING(baseClass) 264 #define DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(baseClass) DEFINE_EVENT_ TARGET_REFCOUNTING(baseClass)
265 #endif 265 #endif
266 266
267 // Use this macro if your EventTarget subclass is also a subclass of WTF::RefCou nted. 267 // Use this macro if your EventTarget subclass is also a subclass of WTF::RefCou nted.
268 // A ref-counted class that uses a different method of refcounting should use DE FINE_EVENT_TARGET_REFCOUNTING directly. 268 // A ref-counted class that uses a different method of refcounting should use DE FINE_EVENT_TARGET_REFCOUNTING directly.
269 // Both of these macros are meant to be placed just before the "public:" section of the class declaration. 269 // Both of these macros are meant to be placed just before the "public:" section of the class declaration.
270 #define REFCOUNTED_EVENT_TARGET(className) DEFINE_EVENT_TARGET_REFCOUNTING_WILL_ BE_REMOVED(RefCounted<className>) 270 #define REFCOUNTED_EVENT_TARGET(className) DEFINE_EVENT_TARGET_REFCOUNTING_WILL_ BE_REMOVED(RefCounted<className>)
271 271
272 #endif // EventTarget_h 272 #endif // EventTarget_h
OLDNEW
« no previous file with comments | « Source/core/events/EventPath.h ('k') | Source/core/events/FocusEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698