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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 2773973002: Add Startup.BrowserView.FirstPaint / .CompositingEnded histograms. (Closed)
Patch Set: Use more correct place to report timings in Cocoa, fix review remarks. 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
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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 toolbar_(nullptr), 411 toolbar_(nullptr),
412 find_bar_host_view_(nullptr), 412 find_bar_host_view_(nullptr),
413 infobar_container_(nullptr), 413 infobar_container_(nullptr),
414 contents_web_view_(nullptr), 414 contents_web_view_(nullptr),
415 devtools_web_view_(nullptr), 415 devtools_web_view_(nullptr),
416 contents_container_(nullptr), 416 contents_container_(nullptr),
417 initialized_(false), 417 initialized_(false),
418 handling_theme_changed_(false), 418 handling_theme_changed_(false),
419 in_process_fullscreen_(false), 419 in_process_fullscreen_(false),
420 force_location_bar_focus_(false), 420 force_location_bar_focus_(false),
421 activate_modal_dialog_factory_(this) { 421 activate_modal_dialog_factory_(this) {}
422 }
423 422
424 BrowserView::~BrowserView() { 423 BrowserView::~BrowserView() {
425 // All the tabs should have been destroyed already. If we were closed by the 424 // All the tabs should have been destroyed already. If we were closed by the
426 // OS with some tabs than the NativeBrowserFrame should have destroyed them. 425 // OS with some tabs than the NativeBrowserFrame should have destroyed them.
427 DCHECK_EQ(0, browser_->tab_strip_model()->count()); 426 DCHECK_EQ(0, browser_->tab_strip_model()->count());
428 427
429 // Stop the animation timer explicitly here to avoid running it in a nested 428 // Stop the animation timer explicitly here to avoid running it in a nested
430 // message loop, which may run by Browser destructor. 429 // message loop, which may run by Browser destructor.
431 loading_animation_timer_.Stop(); 430 loading_animation_timer_.Stop();
432 431
(...skipping 1555 matching lines...) Expand 10 before | Expand all | Expand 10 after
1988 } 1987 }
1989 1988
1990 void BrowserView::ViewHierarchyChanged( 1989 void BrowserView::ViewHierarchyChanged(
1991 const ViewHierarchyChangedDetails& details) { 1990 const ViewHierarchyChangedDetails& details) {
1992 if (!initialized_ && details.is_add && details.child == this && GetWidget()) { 1991 if (!initialized_ && details.is_add && details.child == this && GetWidget()) {
1993 InitViews(); 1992 InitViews();
1994 initialized_ = true; 1993 initialized_ = true;
1995 } 1994 }
1996 } 1995 }
1997 1996
1997 void BrowserView::PaintChildren(const ui::PaintContext& context) {
1998 views::ClientView::PaintChildren(context);
1999 histogram_helper_.OnDidPaintChildren(GetWidget()->GetCompositor());
2000 }
2001
1998 void BrowserView::ChildPreferredSizeChanged(View* child) { 2002 void BrowserView::ChildPreferredSizeChanged(View* child) {
1999 Layout(); 2003 Layout();
2000 } 2004 }
2001 2005
2002 void BrowserView::GetAccessibleNodeData(ui::AXNodeData* node_data) { 2006 void BrowserView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
2003 node_data->role = ui::AX_ROLE_CLIENT; 2007 node_data->role = ui::AX_ROLE_CLIENT;
2004 } 2008 }
2005 2009
2006 void BrowserView::OnThemeChanged() { 2010 void BrowserView::OnThemeChanged() {
2007 if (!IsRegularOrGuestSession()) { 2011 if (!IsRegularOrGuestSession()) {
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
2684 } 2688 }
2685 2689
2686 extensions::ActiveTabPermissionGranter* 2690 extensions::ActiveTabPermissionGranter*
2687 BrowserView::GetActiveTabPermissionGranter() { 2691 BrowserView::GetActiveTabPermissionGranter() {
2688 content::WebContents* web_contents = GetActiveWebContents(); 2692 content::WebContents* web_contents = GetActiveWebContents();
2689 if (!web_contents) 2693 if (!web_contents)
2690 return nullptr; 2694 return nullptr;
2691 return extensions::TabHelper::FromWebContents(web_contents) 2695 return extensions::TabHelper::FromWebContents(web_contents)
2692 ->active_tab_permission_granter(); 2696 ->active_tab_permission_granter();
2693 } 2697 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698