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

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

Issue 1232333002: Fix virtual/override/final usage in the rest of Source/core/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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/core/events/EventFactory.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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 void fireEventListeners(Event*, EventTargetData*, EventListenerVector&); 163 void fireEventListeners(Event*, EventTargetData*, EventListenerVector&);
164 void countLegacyEvents(const AtomicString& legacyTypeName, EventListenerVect or*, EventListenerVector*); 164 void countLegacyEvents(const AtomicString& legacyTypeName, EventListenerVect or*, EventListenerVector*);
165 165
166 bool clearAttributeEventListener(const AtomicString& eventType); 166 bool clearAttributeEventListener(const AtomicString& eventType);
167 167
168 friend class EventListenerIterator; 168 friend class EventListenerIterator;
169 }; 169 };
170 170
171 class CORE_EXPORT EventTargetWithInlineData : public EventTarget { 171 class CORE_EXPORT EventTargetWithInlineData : public EventTarget {
172 protected: 172 protected:
173 virtual EventTargetData* eventTargetData() override final { return &m_eventT argetData; } 173 EventTargetData* eventTargetData() final { return &m_eventTargetData; }
174 virtual EventTargetData& ensureEventTargetData() override final { return m_e ventTargetData; } 174 EventTargetData& ensureEventTargetData() final { return m_eventTargetData; }
175 private: 175 private:
176 EventTargetData m_eventTargetData; 176 EventTargetData m_eventTargetData;
177 }; 177 };
178 178
179 // Base class for classes that wish to inherit from RefCountedGarbageCollected ( in non-Oilpan world) and 179 // Base class for classes that wish to inherit from RefCountedGarbageCollected ( in non-Oilpan world) and
180 // EventTargetWithInlineData (in both worlds). For details about how to use this class template, see the comments for 180 // EventTargetWithInlineData (in both worlds). For details about how to use this class template, see the comments for
181 // EventTargetWithInlineData above. 181 // EventTargetWithInlineData above.
182 // 182 //
183 // This class template exists to circumvent Oilpan's "leftmost class rule", wher e the Oilpan classes must come first in 183 // This class template exists to circumvent Oilpan's "leftmost class rule", wher e the Oilpan classes must come first in
184 // the base class list to avoid memory offset adjustment. In non-Oilpan world, R efCountedGarbageCollected<T> must come 184 // the base class list to avoid memory offset adjustment. In non-Oilpan world, R efCountedGarbageCollected<T> must come
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 #if ENABLE(OILPAN) 285 #if ENABLE(OILPAN)
286 #define DEFINE_EVENT_TARGET_REFCOUNTING(baseClass) 286 #define DEFINE_EVENT_TARGET_REFCOUNTING(baseClass)
287 #define REFCOUNTED_EVENT_TARGET(baseClass) 287 #define REFCOUNTED_EVENT_TARGET(baseClass)
288 #define REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(baseClass) 288 #define REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(baseClass)
289 #else // !ENABLE(OILPAN) 289 #else // !ENABLE(OILPAN)
290 #define DEFINE_EVENT_TARGET_REFCOUNTING(baseClass) \ 290 #define DEFINE_EVENT_TARGET_REFCOUNTING(baseClass) \
291 public: \ 291 public: \
292 using baseClass::ref; \ 292 using baseClass::ref; \
293 using baseClass::deref; \ 293 using baseClass::deref; \
294 private: \ 294 private: \
295 virtual void refEventTarget() override final { ref(); } \ 295 void refEventTarget() final { ref(); } \
296 virtual void derefEventTarget() override final { deref(); } \ 296 void derefEventTarget() final { deref(); } \
297 typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro 297 typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro
298 #define REFCOUNTED_EVENT_TARGET(baseClass) DEFINE_EVENT_TARGET_REFCOUNTING(RefCo unted<baseClass>) 298 #define REFCOUNTED_EVENT_TARGET(baseClass) DEFINE_EVENT_TARGET_REFCOUNTING(RefCo unted<baseClass>)
299 #define REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(baseClass) DEFINE_EVENT_TARGET _REFCOUNTING(RefCountedGarbageCollected<baseClass>) 299 #define REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(baseClass) DEFINE_EVENT_TARGET _REFCOUNTING(RefCountedGarbageCollected<baseClass>)
300 #endif // ENABLE(OILPAN) 300 #endif // ENABLE(OILPAN)
301 301
302 #endif // EventTarget_h 302 #endif // EventTarget_h
OLDNEW
« no previous file with comments | « Source/core/events/EventFactory.h ('k') | Source/core/events/FocusEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698