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

Unified Diff: third_party/WebKit/Source/core/frame/Frame.h

Issue 2748603002: Add a lifecycle state machine for Page (Closed)
Patch Set: Rebase Created 3 years, 9 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/frame/BUILD.gn ('k') | third_party/WebKit/Source/core/frame/Frame.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/Frame.h
diff --git a/third_party/WebKit/Source/core/frame/Frame.h b/third_party/WebKit/Source/core/frame/Frame.h
index e84cdabc262b1f79297278ee84405a3bce6262bb..f60c6ca1a52ead6882d55e7eb5819f3258784be3 100644
--- a/third_party/WebKit/Source/core/frame/Frame.h
+++ b/third_party/WebKit/Source/core/frame/Frame.h
@@ -30,6 +30,7 @@
#define Frame_h
#include "core/CoreExport.h"
+#include "core/frame/FrameLifecycle.h"
#include "core/frame/FrameTypes.h"
#include "core/loader/FrameLoaderTypes.h"
#include "core/page/FrameTree.h"
@@ -149,7 +150,9 @@ class CORE_EXPORT Frame : public GarbageCollectedFinalized<Frame> {
void setDocumentHasReceivedUserGesture();
bool hasReceivedUserGesture() const { return m_hasReceivedUserGesture; }
- bool isDetaching() const { return m_isDetaching; }
+ bool isAttached() const {
+ return m_lifecycle.state() == FrameLifecycle::Attached;
+ }
// Tests whether the feature-policy controlled feature is enabled by policy in
// the given frame.
@@ -165,13 +168,15 @@ class CORE_EXPORT Frame : public GarbageCollectedFinalized<Frame> {
Member<DOMWindow> m_domWindow;
bool m_hasReceivedUserGesture = false;
- bool m_isDetaching = false;
+
+ FrameLifecycle m_lifecycle;
private:
bool canNavigateWithoutFramebusting(const Frame&, String& errorReason);
Member<FrameClient> m_client;
const Member<WindowProxyManager> m_windowProxyManager;
+ // TODO(sashab): Investigate if this can be represented with m_lifecycle.
bool m_isLoading;
};
« no previous file with comments | « third_party/WebKit/Source/core/frame/BUILD.gn ('k') | third_party/WebKit/Source/core/frame/Frame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698