Chromium Code Reviews| Index: chrome/browser/ui/cocoa/browser_window_controller.mm |
| diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm |
| index 065825b4920db087379d011b35dab038a736242e..b7f1d07741e48fff39d4d8905e11e7d988d607a5 100644 |
| --- a/chrome/browser/ui/cocoa/browser_window_controller.mm |
| +++ b/chrome/browser/ui/cocoa/browser_window_controller.mm |
| @@ -1029,6 +1029,13 @@ bool IsTabDetachingInFullscreenEnabled() { |
| if (manager) |
| manager->DisplayPendingRequests(); |
| } |
| + |
| + // If the web contents want to focus on the location bar, do not call the |
| + // animation since the location bar will drop down when it's focused. |
| + bool will_focus_location_bar = |
|
Robert Sesek
2016/06/23 14:08:24
naming: camelCase
spqchan
2016/06/23 19:41:52
Done.
|
| + newContents && newContents->FocusLocationBarByDefault(); |
| + if ([self isInAnyFullscreenMode] && !will_focus_location_bar) |
| + [[self presentationModeController] revealToolbarForTabStripChanges]; |
| } |
| - (void)zoomChangedForActiveTab:(BOOL)canShowBubble { |
| @@ -1477,6 +1484,11 @@ bool IsTabDetachingInFullscreenEnabled() { |
| [infoBarContainerController_ tabDetachedWithContents:contents]; |
| } |
| +- (void)onTabInsertedInForeground:(BOOL)inForeground { |
| + if ([self isInAnyFullscreenMode] && !inForeground) |
| + [[self presentationModeController] revealToolbarForTabStripChanges]; |
| +} |
| + |
| - (void)userChangedTheme { |
| NSView* rootView = [[[self window] contentView] superview]; |
| [rootView cr_recursivelyInvokeBlock:^(id view) { |