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

Side by Side Diff: public/web/WebPageImportanceSignals.h

Issue 1345023002: Expose WebPageImportanceSignals to embedder (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: issue pageImportanceSignalsUpdated from itself Created 5 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 unified diff | Download patch
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | public/web/WebView.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebPageImportanceSignals_h 5 #ifndef WebPageImportanceSignals_h
6 #define WebPageImportanceSignals_h 6 #define WebPageImportanceSignals_h
7 7
8 #include "public/platform/WebCommon.h" 8 #include "public/platform/WebCommon.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 class WebViewClient;
13
12 // WebPageImportanceSignals indicate the importance of the page state to user. 14 // WebPageImportanceSignals indicate the importance of the page state to user.
13 // This signal is propagated to embedder so that it can prioritize preserving 15 // This signal is propagated to embedder so that it can prioritize preserving
14 // state of certain page over the others. 16 // state of certain page over the others.
15 class WebPageImportanceSignals { 17 class WebPageImportanceSignals {
16 public: 18 public:
17 WebPageImportanceSignals() { reset(); } 19 WebPageImportanceSignals() { reset(); }
18 20
19 bool hadFormInteraction() const { return m_hadFormInteraction; } 21 bool hadFormInteraction() const { return m_hadFormInteraction; }
20 void setHadFormInteraction() { m_hadFormInteraction = true; } 22 void setHadFormInteraction();
21 23
22 BLINK_EXPORT void reset(); 24 BLINK_EXPORT void reset();
23 #if BLINK_IMPLEMENTATION 25 #if BLINK_IMPLEMENTATION
24 void onCommitLoad(); 26 void onCommitLoad();
25 #endif 27 #endif
26 28
29 void setObserver(WebViewClient* observer) { m_observer = observer; }
30
27 private: 31 private:
28 bool m_hadFormInteraction : 1; 32 bool m_hadFormInteraction : 1;
33 WebViewClient* m_observer = nullptr;
29 }; 34 };
30 35
31 } // namespace blink 36 } // namespace blink
32 37
33 #endif // WebPageImportancesignals_h 38 #endif // WebPageImportancesignals_h
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | public/web/WebView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698