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

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

Issue 2773973002: Add Startup.BrowserView.FirstPaint / .CompositingEnded histograms. (Closed)
Patch Set: BrowserView --> BrowserWindow, use factory method for class creation. 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
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 a1cbb838069202e58a1b5d0eff4b9434f89e5707..162200166eddbae8b07701dd2576cd3e5ce31547 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,14 @@ 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_.get())
Alexei Svitkine (slow) 2017/04/18 16:01:32 Nit: {} Also, does if (!histogram_helper_) work?
themblsha 2017/04/19 15:06:09 sky prefers the absence of curly brackets on singl
+ histogram_helper_ = BrowserWindowHistogramHelper::OnBrowserPainted(
+ GetWidget()->GetCompositor());
+}
+
void BrowserView::ChildPreferredSizeChanged(View* child) {
Layout();
}

Powered by Google App Engine
This is Rietveld 408576698