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

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

Issue 2408333004: Move persistent gesture state to Document, add DocumentUserGestureToken (Closed)
Patch Set: Re-add dropped null check 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
« no previous file with comments | « third_party/WebKit/Source/core/BUILD.gn ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 40ec07d36da6841e83fe3673db9bcf585c886645..b0ecc5f987a3bcc0139f74630d7e79400c585f04 100644
--- a/third_party/WebKit/Source/core/dom/Document.h
+++ b/third_party/WebKit/Source/core/dom/Document.h
@@ -1314,6 +1314,14 @@ class CORE_EXPORT Document : public ContainerNode,
PropertyRegistry* propertyRegistry();
+ // Indicates whether the user has interacted with this particular Document.
+ void setHasReceivedUserGesture() { m_hasReceivedUserGesture = true; }
+ // Consume user interaction state. Used for an experiment that restricts
+ // adding history entries to Documents that have had a user gesture since
+ // last history state change.
+ void clearHasReceivedUserGesture() { m_hasReceivedUserGesture = false; }
+ bool hasReceivedUserGesture() const { return m_hasReceivedUserGesture; }
+
protected:
Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass);
@@ -1558,6 +1566,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.
« no previous file with comments | « third_party/WebKit/Source/core/BUILD.gn ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698