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

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

Issue 25036004: Add a lifecycle state machine for Document (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 3 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 | « Source/core/core.gypi ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.h
diff --git a/Source/core/dom/Document.h b/Source/core/dom/Document.h
index 461ebb5460931fb2769aa11103b51c324c9a8497..00d11a8ab1f8081734739a291d376aeda5c4d797 100644
--- a/Source/core/dom/Document.h
+++ b/Source/core/dom/Document.h
@@ -33,6 +33,7 @@
#include "core/dom/CustomElement.h"
#include "core/dom/DOMTimeStamp.h"
#include "core/dom/DocumentInit.h"
+#include "core/dom/DocumentLifecycle.h"
#include "core/dom/DocumentTiming.h"
#include "core/dom/IconURL.h"
#include "core/dom/MutationObserver.h"
@@ -42,12 +43,13 @@
#include "core/dom/TreeScope.h"
#include "core/dom/UserActionElementSet.h"
#include "core/dom/ViewportArguments.h"
+#include "core/events/DocumentEventQueue.h"
#include "core/html/CollectionType.h"
#include "core/page/FocusDirection.h"
#include "core/page/PageVisibilityState.h"
-#include "weborigin/ReferrerPolicy.h"
#include "core/platform/Timer.h"
#include "core/rendering/HitTestRequest.h"
+#include "weborigin/ReferrerPolicy.h"
#include "wtf/HashSet.h"
#include "wtf/OwnPtr.h"
#include "wtf/PassOwnPtr.h"
@@ -1057,6 +1059,7 @@ public:
PassRefPtr<FontFaceSet> fonts();
DocumentLifecycleNotifier* lifecycleNotifier();
+ bool isActive() const { return m_lifecyle.state() == DocumentLifecycle::Active; }
enum HttpRefreshType {
HttpRefreshFromHeader,
@@ -1151,6 +1154,8 @@ private:
void processHttpEquivXFrameOptions(const String& content);
void processHttpEquivContentSecurityPolicy(const String& equiv, const String& content);
+ DocumentLifecycle m_lifecyle;
+
// FIXME: This should probably be handled inside the style resolver itself.
Timer<Document> m_styleResolverThrowawayTimer;
unsigned m_styleResolverAccessCount;
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698