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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 toolbar_(nullptr), 412 toolbar_(nullptr),
413 find_bar_host_view_(nullptr), 413 find_bar_host_view_(nullptr),
414 infobar_container_(nullptr), 414 infobar_container_(nullptr),
415 contents_web_view_(nullptr), 415 contents_web_view_(nullptr),
416 devtools_web_view_(nullptr), 416 devtools_web_view_(nullptr),
417 contents_container_(nullptr), 417 contents_container_(nullptr),
418 initialized_(false), 418 initialized_(false),
419 handling_theme_changed_(false), 419 handling_theme_changed_(false),
420 in_process_fullscreen_(false), 420 in_process_fullscreen_(false),
421 force_location_bar_focus_(false), 421 force_location_bar_focus_(false),
422 activate_modal_dialog_factory_(this) { 422 activate_modal_dialog_factory_(this) {}
423 }
424 423
425 BrowserView::~BrowserView() { 424 BrowserView::~BrowserView() {
426 // All the tabs should have been destroyed already. If we were closed by the 425 // All the tabs should have been destroyed already. If we were closed by the
427 // OS with some tabs than the NativeBrowserFrame should have destroyed them. 426 // OS with some tabs than the NativeBrowserFrame should have destroyed them.
428 DCHECK_EQ(0, browser_->tab_strip_model()->count()); 427 DCHECK_EQ(0, browser_->tab_strip_model()->count());
429 428
430 // Stop the animation timer explicitly here to avoid running it in a nested 429 // Stop the animation timer explicitly here to avoid running it in a nested
431 // message loop, which may run by Browser destructor. 430 // message loop, which may run by Browser destructor.
432 loading_animation_timer_.Stop(); 431 loading_animation_timer_.Stop();
433 432
(...skipping 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after
1993 } 1992 }
1994 1993
1995 void BrowserView::ViewHierarchyChanged( 1994 void BrowserView::ViewHierarchyChanged(
1996 const ViewHierarchyChangedDetails& details) { 1995 const ViewHierarchyChangedDetails& details) {
1997 if (!initialized_ && details.is_add && details.child == this && GetWidget()) { 1996 if (!initialized_ && details.is_add && details.child == this && GetWidget()) {
1998 InitViews(); 1997 InitViews();
1999 initialized_ = true; 1998 initialized_ = true;
2000 } 1999 }
2001 } 2000 }
2002 2001
2002 void BrowserView::PaintChildren(const ui::PaintContext& context) {
2003 views::ClientView::PaintChildren(context);
2004 // Don't reset the instance before it had a chance to get compositor callback.
2005 if (!histogram_helper_) {
2006 histogram_helper_ = BrowserWindowHistogramHelper::
2007 MaybeRecordValueAndCreateInstanceOnBrowserPaint(
2008 GetWidget()->GetCompositor());
2009 }
2010 }
2011
2003 void BrowserView::ChildPreferredSizeChanged(View* child) { 2012 void BrowserView::ChildPreferredSizeChanged(View* child) {
2004 Layout(); 2013 Layout();
2005 } 2014 }
2006 2015
2007 void BrowserView::GetAccessibleNodeData(ui::AXNodeData* node_data) { 2016 void BrowserView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
2008 node_data->role = ui::AX_ROLE_CLIENT; 2017 node_data->role = ui::AX_ROLE_CLIENT;
2009 } 2018 }
2010 2019
2011 void BrowserView::OnThemeChanged() { 2020 void BrowserView::OnThemeChanged() {
2012 if (!IsRegularOrGuestSession()) { 2021 if (!IsRegularOrGuestSession()) {
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
2686 } 2695 }
2687 2696
2688 extensions::ActiveTabPermissionGranter* 2697 extensions::ActiveTabPermissionGranter*
2689 BrowserView::GetActiveTabPermissionGranter() { 2698 BrowserView::GetActiveTabPermissionGranter() {
2690 content::WebContents* web_contents = GetActiveWebContents(); 2699 content::WebContents* web_contents = GetActiveWebContents();
2691 if (!web_contents) 2700 if (!web_contents)
2692 return nullptr; 2701 return nullptr;
2693 return extensions::TabHelper::FromWebContents(web_contents) 2702 return extensions::TabHelper::FromWebContents(web_contents)
2694 ->active_tab_permission_granter(); 2703 ->active_tab_permission_granter();
2695 } 2704 }
OLDNEW
« 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