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

Unified Diff: third_party/WebKit/Source/core/events/EventTarget.h

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/events/EventTarget.h
diff --git a/third_party/WebKit/Source/core/events/EventTarget.h b/third_party/WebKit/Source/core/events/EventTarget.h
index fa1cd9ffb90cb9fb7eb496a1072950f1029118aa..3ececf980b40fe84e2cf4ccdfb17d26521b500ed 100644
--- a/third_party/WebKit/Source/core/events/EventTarget.h
+++ b/third_party/WebKit/Source/core/events/EventTarget.h
@@ -67,9 +67,8 @@ struct FiringEventIterator {
};
using FiringEventIteratorVector = Vector<FiringEventIterator, 1>;
-class CORE_EXPORT EventTargetData final : public NoBaseWillBeGarbageCollectedFinalized<EventTargetData> {
+class CORE_EXPORT EventTargetData final : public GarbageCollectedFinalized<EventTargetData> {
WTF_MAKE_NONCOPYABLE(EventTargetData);
- USING_FAST_MALLOC_WILL_BE_REMOVED(EventTargetData);
public:
EventTargetData();
~EventTargetData();
@@ -112,7 +111,7 @@ public:
//
// Optionally, add a FooEvent.idl class, but that's outside the scope of this
// comment (and much more straightforward).
-class CORE_EXPORT EventTarget : public NoBaseWillBeGarbageCollectedFinalized<EventTarget>, public ScriptWrappable {
+class CORE_EXPORT EventTarget : public GarbageCollectedFinalized<EventTarget>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
virtual ~EventTarget();
@@ -130,25 +129,25 @@ public:
virtual LocalDOMWindow* toDOMWindow();
virtual MessagePort* toMessagePort();
- bool addEventListener(const AtomicString& eventType, PassRefPtrWillBeRawPtr<EventListener>, bool useCapture = false);
- bool addEventListener(const AtomicString& eventType, PassRefPtrWillBeRawPtr<EventListener>, const EventListenerOptionsOrBoolean&);
- bool addEventListener(const AtomicString& eventType, PassRefPtrWillBeRawPtr<EventListener>, EventListenerOptions&);
+ bool addEventListener(const AtomicString& eventType, RawPtr<EventListener>, bool useCapture = false);
+ bool addEventListener(const AtomicString& eventType, RawPtr<EventListener>, const EventListenerOptionsOrBoolean&);
+ bool addEventListener(const AtomicString& eventType, RawPtr<EventListener>, EventListenerOptions&);
- bool removeEventListener(const AtomicString& eventType, PassRefPtrWillBeRawPtr<EventListener>, bool useCapture = false);
- bool removeEventListener(const AtomicString& eventType, PassRefPtrWillBeRawPtr<EventListener>, const EventListenerOptionsOrBoolean&);
- bool removeEventListener(const AtomicString& eventType, PassRefPtrWillBeRawPtr<EventListener>, EventListenerOptions&);
+ bool removeEventListener(const AtomicString& eventType, RawPtr<EventListener>, bool useCapture = false);
+ bool removeEventListener(const AtomicString& eventType, RawPtr<EventListener>, const EventListenerOptionsOrBoolean&);
+ bool removeEventListener(const AtomicString& eventType, RawPtr<EventListener>, EventListenerOptions&);
virtual void removeAllEventListeners();
- DispatchEventResult dispatchEvent(PassRefPtrWillBeRawPtr<Event>);
+ DispatchEventResult dispatchEvent(RawPtr<Event>);
// dispatchEventForBindings is intended to only be called from
// javascript originated calls. This method will validate and may adjust
// the Event object before dispatching.
- bool dispatchEventForBindings(PassRefPtrWillBeRawPtr<Event>, ExceptionState&);
+ bool dispatchEventForBindings(RawPtr<Event>, ExceptionState&);
virtual void uncaughtExceptionInEventHandler();
// Used for legacy "onEvent" attribute APIs.
- bool setAttributeEventListener(const AtomicString& eventType, PassRefPtrWillBeRawPtr<EventListener>);
+ bool setAttributeEventListener(const AtomicString& eventType, RawPtr<EventListener>);
EventListener* getAttributeEventListener(const AtomicString& eventType);
bool hasEventListeners() const;
@@ -168,9 +167,9 @@ public:
protected:
EventTarget();
- virtual bool addEventListenerInternal(const AtomicString& eventType, PassRefPtrWillBeRawPtr<EventListener>, const EventListenerOptions&);
- virtual bool removeEventListenerInternal(const AtomicString& eventType, PassRefPtrWillBeRawPtr<EventListener>, const EventListenerOptions&);
- virtual DispatchEventResult dispatchEventInternal(PassRefPtrWillBeRawPtr<Event>);
+ virtual bool addEventListenerInternal(const AtomicString& eventType, RawPtr<EventListener>, const EventListenerOptions&);
+ virtual bool removeEventListenerInternal(const AtomicString& eventType, RawPtr<EventListener>, const EventListenerOptions&);
+ virtual DispatchEventResult dispatchEventInternal(RawPtr<Event>);
// Subclasses should likely not override these themselves; instead, they should subclass EventTargetWithInlineData.
virtual EventTargetData* eventTargetData() = 0;
@@ -251,15 +250,15 @@ public:
// macros to avoid causing so many header includes.
#define DEFINE_ATTRIBUTE_EVENT_LISTENER(attribute) \
EventListener* on##attribute() { return this->getAttributeEventListener(EventTypeNames::attribute); } \
- void setOn##attribute(PassRefPtrWillBeRawPtr<EventListener> listener) { this->setAttributeEventListener(EventTypeNames::attribute, listener); } \
+ void setOn##attribute(RawPtr<EventListener> listener) { this->setAttributeEventListener(EventTypeNames::attribute, listener); } \
#define DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(attribute) \
static EventListener* on##attribute(EventTarget& eventTarget) { return eventTarget.getAttributeEventListener(EventTypeNames::attribute); } \
- static void setOn##attribute(EventTarget& eventTarget, PassRefPtrWillBeRawPtr<EventListener> listener) { eventTarget.setAttributeEventListener(EventTypeNames::attribute, listener); } \
+ static void setOn##attribute(EventTarget& eventTarget, RawPtr<EventListener> listener) { eventTarget.setAttributeEventListener(EventTypeNames::attribute, listener); } \
#define DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(attribute) \
EventListener* on##attribute() { return document().getWindowAttributeEventListener(EventTypeNames::attribute); } \
- void setOn##attribute(PassRefPtrWillBeRawPtr<EventListener> listener) { document().setWindowAttributeEventListener(EventTypeNames::attribute, listener); } \
+ void setOn##attribute(RawPtr<EventListener> listener) { document().setWindowAttributeEventListener(EventTypeNames::attribute, listener); } \
#define DEFINE_STATIC_WINDOW_ATTRIBUTE_EVENT_LISTENER(attribute) \
static EventListener* on##attribute(EventTarget& eventTarget) { \
@@ -268,7 +267,7 @@ public:
ASSERT(eventTarget.toDOMWindow()); \
return eventTarget.getAttributeEventListener(EventTypeNames::attribute); \
} \
- static void setOn##attribute(EventTarget& eventTarget, PassRefPtrWillBeRawPtr<EventListener> listener) { \
+ static void setOn##attribute(EventTarget& eventTarget, RawPtr<EventListener> listener) { \
if (Node* node = eventTarget.toNode()) \
node->document().setWindowAttributeEventListener(EventTypeNames::attribute, listener); \
else { \
@@ -279,7 +278,7 @@ public:
#define DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(attribute, eventName) \
EventListener* on##attribute() { return getAttributeEventListener(EventTypeNames::eventName); } \
- void setOn##attribute(PassRefPtrWillBeRawPtr<EventListener> listener) { setAttributeEventListener(EventTypeNames::eventName, listener); } \
+ void setOn##attribute(RawPtr<EventListener> listener) { setAttributeEventListener(EventTypeNames::eventName, listener); } \
inline bool EventTarget::hasEventListeners() const
{
« no previous file with comments | « third_party/WebKit/Source/core/events/EventSender.h ('k') | third_party/WebKit/Source/core/events/EventTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698