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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 2773973002: Add Startup.BrowserView.FirstPaint / .CompositingEnded histograms. (Closed)
Patch Set: Don't wait for histograms that are not reported during browser_tests. Created 3 years, 8 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 | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 4d3c09b477956c13a90c0dd7994103300574c09c..f614c24070c12e8a7b07dafc6e7874cba74cfc8c 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -419,8 +419,7 @@ BrowserView::BrowserView()
handling_theme_changed_(false),
in_process_fullscreen_(false),
force_location_bar_focus_(false),
- activate_modal_dialog_factory_(this) {
-}
+ activate_modal_dialog_factory_(this) {}
BrowserView::~BrowserView() {
// All the tabs should have been destroyed already. If we were closed by the
@@ -2000,6 +1999,16 @@ void BrowserView::ViewHierarchyChanged(
}
}
+void BrowserView::PaintChildren(const ui::PaintContext& context) {
+ views::ClientView::PaintChildren(context);
+ // Don't reset the instance before it had a chance to get compositor callback.
+ if (!histogram_helper_) {
+ histogram_helper_ = BrowserWindowHistogramHelper::
+ MaybeRecordValueAndCreateInstanceOnBrowserPaint(
+ GetWidget()->GetCompositor());
+ }
+}
+
void BrowserView::ChildPreferredSizeChanged(View* child) {
Layout();
}
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698