Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / Source / web / WebPageImportanceSignals.cpp
blob30956e6452e2a1a649811c275368b9a6730f7f57
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 #include "config.h"
6 #include "public/web/WebPageImportanceSignals.h"
7 #include "public/web/WebViewClient.h"
9 #include "public/platform/Platform.h"
11 namespace blink {
13 void WebPageImportanceSignals::reset()
15 m_hadFormInteraction = false;
16 if (m_observer)
17 m_observer->pageImportanceSignalsChanged();
20 void WebPageImportanceSignals::setHadFormInteraction()
22 m_hadFormInteraction = true;
23 if (m_observer)
24 m_observer->pageImportanceSignalsChanged();
27 void WebPageImportanceSignals::onCommitLoad()
29 Platform::current()->histogramEnumeration("PageImportanceSignals.HadFormInteraction.OnCommitLoad", m_hadFormInteraction, 2);
31 reset();
34 } // namespace blink