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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_cocoa.mm

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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/cocoa/browser_window_cocoa.h" 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #import "base/mac/sdk_forward_declarations.h" 10 #import "base/mac/sdk_forward_declarations.h"
11 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "base/strings/sys_string_conversions.h" 13 #include "base/strings/sys_string_conversions.h"
14 #include "chrome/app/chrome_command_ids.h" 14 #include "chrome/app/chrome_command_ids.h"
15 #include "chrome/browser/chrome_notification_types.h" 15 #include "chrome/browser/chrome_notification_types.h"
16 #include "chrome/browser/download/download_shelf.h" 16 #include "chrome/browser/download/download_shelf.h"
17 #include "chrome/browser/extensions/extension_util.h" 17 #include "chrome/browser/extensions/extension_util.h"
18 #include "chrome/browser/extensions/tab_helper.h" 18 #include "chrome/browser/extensions/tab_helper.h"
19 #include "chrome/browser/profiles/profile.h" 19 #include "chrome/browser/profiles/profile.h"
20 #include "chrome/browser/profiles/profile_window.h" 20 #include "chrome/browser/profiles/profile_window.h"
21 #include "chrome/browser/shell_integration.h" 21 #include "chrome/browser/shell_integration.h"
22 #include "chrome/browser/signin/chrome_signin_helper.h" 22 #include "chrome/browser/signin/chrome_signin_helper.h"
23 #include "chrome/browser/translate/chrome_translate_client.h" 23 #include "chrome/browser/translate/chrome_translate_client.h"
24 #include "chrome/browser/ui/browser.h" 24 #include "chrome/browser/ui/browser.h"
25 #include "chrome/browser/ui/browser_command_controller.h" 25 #include "chrome/browser/ui/browser_command_controller.h"
26 #include "chrome/browser/ui/browser_commands.h" 26 #include "chrome/browser/ui/browser_commands.h"
27 #include "chrome/browser/ui/browser_dialogs.h" 27 #include "chrome/browser/ui/browser_dialogs.h"
28 #include "chrome/browser/ui/browser_list.h" 28 #include "chrome/browser/ui/browser_list.h"
29 #include "chrome/browser/ui/browser_view_histogram_helper.h"
29 #include "chrome/browser/ui/browser_window_state.h" 30 #include "chrome/browser/ui/browser_window_state.h"
30 #import "chrome/browser/ui/cocoa/autofill/save_card_bubble_view_bridge.h" 31 #import "chrome/browser/ui/cocoa/autofill/save_card_bubble_view_bridge.h"
31 #import "chrome/browser/ui/cocoa/browser/exclusive_access_controller_views.h" 32 #import "chrome/browser/ui/cocoa/browser/exclusive_access_controller_views.h"
32 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 33 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
33 #import "chrome/browser/ui/cocoa/browser_window_utils.h" 34 #import "chrome/browser/ui/cocoa/browser_window_utils.h"
34 #import "chrome/browser/ui/cocoa/chrome_event_processing_window.h" 35 #import "chrome/browser/ui/cocoa/chrome_event_processing_window.h"
35 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_con troller.h" 36 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_con troller.h"
36 #import "chrome/browser/ui/cocoa/download/download_shelf_controller.h" 37 #import "chrome/browser/ui/cocoa/download/download_shelf_controller.h"
37 #import "chrome/browser/ui/cocoa/extensions/browser_actions_controller.h" 38 #import "chrome/browser/ui/cocoa/extensions/browser_actions_controller.h"
38 #include "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h" 39 #include "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 saved_animation_behavior = [window() animationBehavior]; 169 saved_animation_behavior = [window() animationBehavior];
169 [window() setAnimationBehavior:NSWindowAnimationBehaviorNone]; 170 [window() setAnimationBehavior:NSWindowAnimationBehaviorNone];
170 } 171 }
171 172
172 { 173 {
173 TRACE_EVENT0("ui", "BrowserWindowCocoa::Show makeKeyAndOrderFront"); 174 TRACE_EVENT0("ui", "BrowserWindowCocoa::Show makeKeyAndOrderFront");
174 // This call takes up a substantial part of startup time, and an even more 175 // This call takes up a substantial part of startup time, and an even more
175 // substantial part of startup time when any CALayers are part of the 176 // substantial part of startup time when any CALayers are part of the
176 // window's NSView heirarchy. 177 // window's NSView heirarchy.
177 [window() makeKeyAndOrderFront:controller_]; 178 [window() makeKeyAndOrderFront:controller_];
179
180 // At this point all the Browser's UI is painted on the screen. There's no
181 // need to wait for the compositor, so pass the nullptr instead.
182 BrowserViewHistogramHelper().OnDidPaintChildren(nullptr);
178 } 183 }
179 184
180 // When creating windows from nibs it is necessary to |makeKeyAndOrderFront:| 185 // When creating windows from nibs it is necessary to |makeKeyAndOrderFront:|
181 // prior to |orderOut:| then |miniaturize:| when restoring windows in the 186 // prior to |orderOut:| then |miniaturize:| when restoring windows in the
182 // minimized state. 187 // minimized state.
183 if (initial_show_state_ == ui::SHOW_STATE_MINIMIZED) { 188 if (initial_show_state_ == ui::SHOW_STATE_MINIMIZED) {
184 [window() orderOut:controller_]; 189 [window() orderOut:controller_];
185 [window() miniaturize:controller_]; 190 [window() miniaturize:controller_];
186 } else if (initial_show_state_ == ui::SHOW_STATE_FULLSCREEN) { 191 } else if (initial_show_state_ == ui::SHOW_STATE_FULLSCREEN) {
187 chrome::ToggleFullscreenMode(browser_); 192 chrome::ToggleFullscreenMode(browser_);
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { 845 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() {
841 return [controller_ exclusiveAccessController]; 846 return [controller_ exclusiveAccessController];
842 } 847 }
843 848
844 void BrowserWindowCocoa::ShowImeWarningBubble( 849 void BrowserWindowCocoa::ShowImeWarningBubble(
845 const extensions::Extension* extension, 850 const extensions::Extension* extension,
846 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& 851 const base::Callback<void(ImeWarningBubblePermissionStatus status)>&
847 callback) { 852 callback) {
848 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; 853 NOTREACHED() << "The IME warning bubble is unsupported on this platform.";
849 } 854 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698