| 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 4ab8af89a5846f6f22131b898c78520a55fe9f89..71587ccddc701fb959fa9ba0911f43be10cf8dc3 100644
|
| --- a/chrome/browser/ui/cocoa/browser_window_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
|
| @@ -1028,6 +1028,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 willFocusLocationBar =
|
| + newContents && newContents->FocusLocationBarByDefault();
|
| + if ([self isInAnyFullscreenMode] && !willFocusLocationBar)
|
| + [[self presentationModeController] revealToolbarForTabStripChanges];
|
| }
|
|
|
| - (void)zoomChangedForActiveTab:(BOOL)canShowBubble {
|
| @@ -1476,6 +1483,13 @@ bool IsTabDetachingInFullscreenEnabled() {
|
| [infoBarContainerController_ tabDetachedWithContents:contents];
|
| }
|
|
|
| +- (void)onTabInsertedInForeground:(BOOL)inForeground {
|
| + if ([self isInAnyFullscreenMode] && !inForeground &&
|
| + ![toolbarController_ isLocationBarFocused]) {
|
| + [[self presentationModeController] revealToolbarForTabStripChanges];
|
| + }
|
| +}
|
| +
|
| - (void)userChangedTheme {
|
| NSView* rootView = [[[self window] contentView] superview];
|
| [rootView cr_recursivelyInvokeBlock:^(id view) {
|
| @@ -1824,6 +1838,10 @@ willAnimateFromState:(BookmarkBar::State)oldState
|
| return presentationModeController_.get();
|
| }
|
|
|
| +- (void)setPresentationModeController:(PresentationModeController*)controller {
|
| + presentationModeController_.reset([controller retain]);
|
| +}
|
| +
|
| - (void)executeExtensionCommand:(const std::string&)extension_id
|
| command:(const extensions::Command&)command {
|
| // Global commands are handled by the ExtensionCommandsGlobalRegistry
|
|
|