Commit ef62def7 authored by Albert Chaulk's avatar Albert Chaulk Committed by Commit Bot

Propagate did_first_visually_non_empty_paint to the grpc client

Bug: None
Test: None
Change-Id: Ie720aa5c16971f0105504cb089e0b27a46c5d32e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1953670Reviewed-by: default avatarDaniel Nicoara <dnicoara@chromium.org>
Commit-Queue: Albert Chaulk <achaulk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735084}
parent 1a128904
......@@ -122,6 +122,18 @@ void WebviewController::ProcessRequest(const webview::WebviewRequest& request) {
}
}
void WebviewController::DidFirstVisuallyNonEmptyPaint() {
if (client_) {
std::unique_ptr<webview::WebviewResponse> response =
std::make_unique<webview::WebviewResponse>();
auto* event = response->mutable_page_event();
event->set_url(contents_->GetURL().spec());
event->set_current_page_state(current_state());
event->set_did_first_visually_non_empty_paint(true);
client_->EnqueueSend(std::move(response));
}
}
void WebviewController::SendNavigationEvent(
WebviewNavigationThrottle* throttle,
content::NavigationHandle* navigation_handle) {
......
......@@ -72,6 +72,9 @@ class WebviewController : public CastWebContents::Delegate,
// CastWebContents::Observer
void ResourceLoadFailed(CastWebContents* cast_web_contents) override;
// content::WebContentsObserver
void DidFirstVisuallyNonEmptyPaint() override;
std::unique_ptr<content::WebContents> contents_;
std::unique_ptr<CastWebContents> cast_web_contents_;
bool stopped_ = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment