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

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

Issue 1479923002: Enumerate the return value of dispatchEvent so it is clear. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_passive_uma_add
Patch Set: Fix typo Created 4 years, 10 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 5f56ecb04adcf376f578f59ca61a2f76aede39e3..8c9e9e96b36acea69964697b9a0828717f4905f8 100644
--- a/third_party/WebKit/Source/core/events/EventTarget.h
+++ b/third_party/WebKit/Source/core/events/EventTarget.h
@@ -38,6 +38,7 @@
#include "core/EventNames.h"
#include "core/EventTargetNames.h"
#include "core/EventTypeNames.h"
+#include "core/events/EventDispatchResult.h"
#include "core/events/EventListenerMap.h"
#include "platform/heap/Handle.h"
#include "wtf/Allocator.h"
@@ -45,8 +46,8 @@
namespace blink {
-class LocalDOMWindow;
class Event;
+class LocalDOMWindow;
class ExceptionState;
class MessagePort;
class Node;
@@ -138,7 +139,7 @@ public:
bool removeEventListener(const AtomicString& eventType, PassRefPtrWillBeRawPtr<EventListener>, EventListenerOptions&);
virtual void removeAllEventListeners();
- bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>);
+ DispatchEventResult dispatchEvent(PassRefPtrWillBeRawPtr<Event>);
// dispatchEventForBindings is intended to only be called from
// javascript originated calls. This method will validate and may adjust
@@ -156,7 +157,9 @@ public:
EventListenerVector* getEventListeners(const AtomicString& eventType);
Vector<AtomicString> eventTypes();
- bool fireEventListeners(Event*);
+ DispatchEventResult fireEventListeners(Event*);
+
+ static DispatchEventResult dispatchEventResult(const Event&);
DEFINE_INLINE_VIRTUAL_TRACE() { }
@@ -167,7 +170,7 @@ protected:
virtual bool addEventListenerInternal(const AtomicString& eventType, PassRefPtrWillBeRawPtr<EventListener>, const EventListenerOptions&);
virtual bool removeEventListenerInternal(const AtomicString& eventType, PassRefPtrWillBeRawPtr<EventListener>, const EventListenerOptions&);
- virtual bool dispatchEventInternal(PassRefPtrWillBeRawPtr<Event>);
+ virtual DispatchEventResult dispatchEventInternal(PassRefPtrWillBeRawPtr<Event>);
// Subclasses should likely not override these themselves; instead, they should subclass EventTargetWithInlineData.
virtual EventTargetData* eventTargetData() = 0;
« no previous file with comments | « third_party/WebKit/Source/core/events/EventDispatcher.cpp ('k') | third_party/WebKit/Source/core/events/EventTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698