1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef WebPageImportanceSignals_h
6 #define WebPageImportanceSignals_h
8 #include "public/platform/WebCommon.h"
14 // WebPageImportanceSignals indicate the importance of the page state to user.
15 // This signal is propagated to embedder so that it can prioritize preserving
16 // state of certain page over the others.
17 class WebPageImportanceSignals
{
19 WebPageImportanceSignals() { reset(); }
21 bool hadFormInteraction() const { return m_hadFormInteraction
; }
22 void setHadFormInteraction();
24 BLINK_EXPORT
void reset();
25 #if BLINK_IMPLEMENTATION
29 void setObserver(WebViewClient
* observer
) { m_observer
= observer
; }
32 bool m_hadFormInteraction
: 1;
33 WebViewClient
* m_observer
= nullptr;
38 #endif // WebPageImportancesignals_h