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

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

Issue 2245723002: Support "once" event listener option (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added forcing 'once' to be always defined." Created 4 years, 4 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
« no previous file with comments | « third_party/WebKit/Source/core/events/EventTarget.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/events/RegisteredEventListener.h
diff --git a/third_party/WebKit/Source/core/events/RegisteredEventListener.h b/third_party/WebKit/Source/core/events/RegisteredEventListener.h
index db4d849efb58b5f14ee827144f5b58f44a0acbd0..ca809c59c40a16f3a77c06c6322ab9f1297ac3bc 100644
--- a/third_party/WebKit/Source/core/events/RegisteredEventListener.h
+++ b/third_party/WebKit/Source/core/events/RegisteredEventListener.h
@@ -36,6 +36,7 @@ public:
RegisteredEventListener()
: m_useCapture(false)
, m_passive(false)
+ , m_once(false)
, m_blockedEventWarningEmitted(false)
, m_passiveForcedForDocumentTarget(false)
{
@@ -45,6 +46,7 @@ public:
: m_listener(listener)
, m_useCapture(options.capture())
, m_passive(options.passive())
+ , m_once(options.once())
, m_blockedEventWarningEmitted(false)
, m_passiveForcedForDocumentTarget(options.passiveForcedForDocumentTarget())
{
@@ -61,6 +63,7 @@ public:
result.setCapture(m_useCapture);
result.setPassive(m_passive);
result.setPassiveForcedForDocumentTarget(m_passiveForcedForDocumentTarget);
+ result.setOnce(m_once);
return result;
}
@@ -79,6 +82,11 @@ public:
return m_passive;
}
+ bool once() const
+ {
+ return m_once;
+ }
+
bool capture() const
{
return m_useCapture;
@@ -119,6 +127,7 @@ private:
Member<EventListener> m_listener;
unsigned m_useCapture : 1;
unsigned m_passive : 1;
+ unsigned m_once : 1;
unsigned m_blockedEventWarningEmitted : 1;
unsigned m_passiveForcedForDocumentTarget : 1;
};
« no previous file with comments | « third_party/WebKit/Source/core/events/EventTarget.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698