Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 | |
| 8 #include "core/dom/Document.h" | |
| 9 #include "core/dom/ExecutionContext.h" | |
| 10 #include "core/frame/FrameHost.h" | |
| 11 #include "core/frame/LocalFrame.h" | |
| 12 #include "public/platform/Platform.h" | |
| 7 #include "public/web/WebViewClient.h" | 13 #include "public/web/WebViewClient.h" |
| 8 | 14 |
| 9 #include "public/platform/Platform.h" | |
| 10 | |
| 11 namespace blink { | 15 namespace blink { |
| 12 | 16 |
| 13 void WebPageImportanceSignals::reset() | 17 void WebPageImportanceSignals::reset() |
| 14 { | 18 { |
| 15 m_hadFormInteraction = false; | 19 m_hadFormInteraction = false; |
| 16 if (m_observer) | 20 if (m_observer) |
| 17 m_observer->pageImportanceSignalsChanged(); | 21 m_observer->pageImportanceSignalsChanged(); |
| 18 } | 22 } |
| 19 | 23 |
| 20 void WebPageImportanceSignals::setHadFormInteraction() | 24 void WebPageImportanceSignals::setHadFormInteraction() |
| 21 { | 25 { |
| 22 m_hadFormInteraction = true; | 26 m_hadFormInteraction = true; |
| 23 if (m_observer) | 27 if (m_observer) |
| 24 m_observer->pageImportanceSignalsChanged(); | 28 m_observer->pageImportanceSignalsChanged(); |
| 25 } | 29 } |
| 26 | 30 |
| 31 void WebPageImportanceSignals::setHadFormInteraction() | |
|
tzik
2015/09/25 03:36:29
s/setHadFormInteraction/setIssuedNonGetFetchFromSc
| |
| 32 { | |
| 33 m_issuedNonGetFetchFromScript = false; | |
| 34 } | |
| 35 | |
| 27 void WebPageImportanceSignals::onCommitLoad() | 36 void WebPageImportanceSignals::onCommitLoad() |
| 28 { | 37 { |
| 29 Platform::current()->histogramEnumeration("PageImportanceSignals.HadFormInte raction.OnCommitLoad", m_hadFormInteraction, 2); | 38 Platform::current()->histogramEnumeration("PageImportanceSignals.HadFormInte raction.OnCommitLoad", m_hadFormInteraction, 2); |
| 39 Platform::current()->histogramEnumeration("PageImportanceSignals.IssuedNonGe tFetchFromScript.OnCommitLoad", m_issuedNonGetFetchFromScript, 2); | |
| 30 | 40 |
| 31 reset(); | 41 reset(); |
| 32 } | 42 } |
| 33 | 43 |
| 34 } // namespace blink | 44 } // namespace blink |
| OLD | NEW |