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

Side by Side Diff: Source/web/WebPageImportanceSignals.cpp

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/ChromeClientImpl.cpp ('k') | Source/web/WebViewImpl.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 #include "config.h" 5 #include "config.h"
6 #include "public/web/WebPageImportanceSignals.h" 6 #include "public/web/WebPageImportanceSignals.h"
7 #include "public/web/WebViewClient.h"
7 8
8 #include "public/platform/Platform.h" 9 #include "public/platform/Platform.h"
9 10
10 namespace blink { 11 namespace blink {
11 12
12 void WebPageImportanceSignals::reset() 13 void WebPageImportanceSignals::reset()
13 { 14 {
14 m_hadFormInteraction = false; 15 m_hadFormInteraction = false;
16 if (m_observer)
17 m_observer->pageImportanceSignalsChanged();
18 }
19
20 void WebPageImportanceSignals::setHadFormInteraction()
21 {
22 m_hadFormInteraction = true;
23 if (m_observer)
24 m_observer->pageImportanceSignalsChanged();
15 } 25 }
16 26
17 void WebPageImportanceSignals::onCommitLoad() 27 void WebPageImportanceSignals::onCommitLoad()
18 { 28 {
19 Platform::current()->histogramEnumeration("PageImportanceSignals.HadFormInte raction.OnCommitLoad", m_hadFormInteraction, 2); 29 Platform::current()->histogramEnumeration("PageImportanceSignals.HadFormInte raction.OnCommitLoad", m_hadFormInteraction, 2);
20 30
21 reset(); 31 reset();
22 } 32 }
23 33
24 } // namespace blink 34 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/ChromeClientImpl.cpp ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698