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

Unified Diff: public/web/WebPageImportanceSignals.h

Issue 1296533003: Introduce WebPageImportanceSignals to judge state preservation needs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: nits Created 5 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 | « Source/web/web.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebPageImportanceSignals.h
diff --git a/public/web/WebPageImportanceSignals.h b/public/web/WebPageImportanceSignals.h
new file mode 100644
index 0000000000000000000000000000000000000000..6e50ff9d9f7b044d8ab1b44250ac5df630683c98
--- /dev/null
+++ b/public/web/WebPageImportanceSignals.h
@@ -0,0 +1,33 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WebPageImportanceSignals_h
+#define WebPageImportanceSignals_h
+
+#include "public/platform/WebCommon.h"
+
+namespace blink {
+
+// WebPageImportanceSignals indicate the importance of the page state to user.
+// This signal is propagated to embedder so that it can prioritize preserving
+// state of certain page over the others.
+class WebPageImportanceSignals {
+public:
+ WebPageImportanceSignals() { reset(); }
+
+ bool hadFormInteraction() const { return m_hadFormInteraction; }
+ void setHadFormInteraction() { m_hadFormInteraction = true; }
+
+ BLINK_EXPORT void reset();
+#if BLINK_IMPLEMENTATION
+ void onCommitLoad();
+#endif
+
+private:
+ bool m_hadFormInteraction : 1;
+};
+
+} // namespace blink
+
+#endif // WebPageImportancesignals_h
« no previous file with comments | « Source/web/web.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698