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

Unified Diff: Source/web/WebViewImpl.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | public/web/WebPageImportanceSignals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index f57c51a0631416a97657ff5db47a1153b8dabf9e..8ab096360e417072101c83d8df7be769fe8f2972 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -482,6 +482,8 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
m_devToolsEmulator = DevToolsEmulator::create(this);
allInstances().add(this);
+
+ m_pageImportanceSignals.setObserver(client);
}
WebViewImpl::~WebViewImpl()
@@ -3834,7 +3836,7 @@ void WebViewImpl::didCommitLoad(bool isNewNavigation, bool isNavigationWithinPag
{
if (isNewNavigation && !isNavigationWithinPage) {
pageScaleConstraintsSet().setNeedsReset(true);
- pageImportanceSignals().onCommitLoad();
+ m_pageImportanceSignals.onCommitLoad();
}
// Give the visual viewport's scroll layer its initial size.
@@ -4020,6 +4022,11 @@ void WebViewImpl::setPageOverlayColor(WebColor color)
m_pageColorOverlay->update();
}
+WebPageImportanceSignals* WebViewImpl::pageImportanceSignals()
+{
+ return &m_pageImportanceSignals;
+}
+
Element* WebViewImpl::focusedElement() const
{
Frame* frame = m_page->focusController().focusedFrame();
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | public/web/WebPageImportanceSignals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698