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

Unified Diff: third_party/WebKit/Source/core/dom/Document.h

Issue 2408333004: Move persistent gesture state to Document, add DocumentUserGestureToken (Closed)
Patch Set: a Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/Document.h
diff --git a/third_party/WebKit/Source/core/dom/Document.h b/third_party/WebKit/Source/core/dom/Document.h
index dbf24300948695646d45183b83c1007d842adeab..bd5f7a1dd8a2f9f5d2a34640659799ff2e37b19b 100644
--- a/third_party/WebKit/Source/core/dom/Document.h
+++ b/third_party/WebKit/Source/core/dom/Document.h
@@ -1284,6 +1284,10 @@ class CORE_EXPORT Document : public ContainerNode,
PropertyRegistry* propertyRegistry();
+ void setHasReceivedUserGesture() { m_hasReceivedUserGesture = true; }
Rick Byers 2016/10/17 17:02:46 Nit: add a short comment describing why this is me
Nate Chapin 2016/10/18 23:26:33 Done.
+ void clearHasReceivedUserGesture() { m_hasReceivedUserGesture = false; }
Rick Byers 2016/10/17 17:02:46 I'm surprised you ever need to clear (I'm sure I'l
Nate Chapin 2016/10/18 23:26:33 Done.
+ bool hasReceivedUserGesture() const { return m_hasReceivedUserGesture; }
+
protected:
Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass);
@@ -1529,6 +1533,7 @@ class CORE_EXPORT Document : public ContainerNode,
bool m_designMode;
bool m_isRunningExecCommand;
+ bool m_hasReceivedUserGesture;
HeapHashSet<WeakMember<const LiveNodeListBase>> m_listsInvalidatedAtDocument;
// Oilpan keeps track of all registered NodeLists.

Powered by Google App Engine
This is Rietveld 408576698