blimp: Update page load status update indicator to use first paint.
The Blimp client uses the load progress status from the engine to
indicate page load progress for a navigation. While this signal informs
us whether the engine has downloaded all the resources for a page, it
can not be used reliably to indicate whether the client has received
any frames/compositor commits for this navigation.
This change uses 2 signals on the engine to indicate to the client
whether a navigation is complete:
1) When the engine is finished loading all the resources for the main
frame.
2) When the first paint has been performed for the main frame after a
navigation. The first paint implies a commit message has been sent
to the client.
The renderer uses compositor's SwapPromises to tie events, like the
first paint, with CompositorFrames and delivers them together to the
browser. Since Blimp uses the remote server LayerTreeHost on the engine,
which does not produce compositor frames and has no output surface, the
renderer now sends these messages after activation instead when using
remote compositing. Also, the remote compositor will activate these
promises immediately after sending the commit message.
BUG=603220
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review-Url: https://codereview.chromium.org/1986883002
Cr-Commit-Position: refs/heads/master@{#396290}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 321514a..678611e5 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2381,6 +2381,12 @@
browser_plugin_embedder_->DidSendScreenRects();
}
+void WebContentsImpl::OnFirstPaintAfterLoad(
+ RenderWidgetHostImpl* render_widget_host) {
+ FOR_EACH_OBSERVER(WebContentsObserver, observers_,
+ DidFirstPaintAfterLoad(render_widget_host));
+}
+
BrowserAccessibilityManager*
WebContentsImpl::GetRootBrowserAccessibilityManager() {
RenderFrameHostImpl* rfh = GetMainFrame();