Commit ff6dfec2 authored by Kevin Marshall's avatar Kevin Marshall Committed by Commit Bot

[fuchsia] Log time to first paint event (AppFirstPaint).

Records a UserAction at the time of the first meaningful paint.

Bug: 1067068
Change-Id: Id1b962642d7deb2b7c085fc21d2056bc8817a249
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2158018Reviewed-by: default avatarSergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Kevin Marshall <kmarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#761080}
parent 78cdaaf9
......@@ -13,6 +13,7 @@
#include "base/fuchsia/default_context.h"
#include "base/fuchsia/fuchsia_logging.h"
#include "base/json/json_writer.h"
#include "base/metrics/user_metrics.h"
#include "base/strings/strcat.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/post_task.h"
......@@ -1065,3 +1066,7 @@ void FrameImpl::RenderViewReady() {
if (window_tree_host_)
window_tree_host_->compositor()->ScheduleDraw();
}
void FrameImpl::DidFirstVisuallyNonEmptyPaint() {
base::RecordComputedAction("AppFirstPaint");
}
......@@ -228,6 +228,7 @@ class FrameImpl : public fuchsia::web::Frame,
const GURL& validated_url) override;
void RenderViewCreated(content::RenderViewHost* render_view_host) override;
void RenderViewReady() override;
void DidFirstVisuallyNonEmptyPaint() override;
const std::unique_ptr<content::WebContents> web_contents_;
ContextImpl* const context_;
......
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