| Index: chrome/browser/ui/cocoa/fullscreen/fullscreen_toolbar_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/fullscreen/fullscreen_toolbar_controller.mm b/chrome/browser/ui/cocoa/fullscreen/fullscreen_toolbar_controller.mm
|
| index f80e083fb15fb17e8d608eba1fa2eee3944f7475..6b553bbeb6dc3ffbfa6b67e4c07e9bba32254c8c 100644
|
| --- a/chrome/browser/ui/cocoa/fullscreen/fullscreen_toolbar_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/fullscreen/fullscreen_toolbar_controller.mm
|
| @@ -47,6 +47,14 @@ const CGFloat kShowFraction = 1.0;
|
| DCHECK(!inFullscreenMode_);
|
| inFullscreenMode_ = YES;
|
|
|
| + // If the location bar is the first responder, don't let the toolbar hide.
|
| + // This is a special signal to -mustShowFullscreenToolbar that the toolbar
|
| + // should remain visible during the transition to fullscreen.
|
| + if ([browserController_ locationBarHasFocus]) {
|
| + [visibilityLockController_ lockToolbarVisibilityForOwner:self
|
| + withAnimation:NO];
|
| + }
|
| +
|
| [self updateToolbarStyleExitingTabFullscreen:NO];
|
|
|
| if ([browserController_ isInImmersiveFullscreen]) {
|
| @@ -60,6 +68,11 @@ const CGFloat kShowFraction = 1.0;
|
| initWithFullscreenToolbarController:self
|
| animationController:animationController_.get()]);
|
| }
|
| +
|
| + // Let the location bar keep the toolbar locked in place from here on out
|
| + // (if it's the first responder).
|
| + [visibilityLockController_ releaseToolbarVisibilityForOwner:self
|
| + withAnimation:YES];
|
| }
|
|
|
| - (void)exitFullscreenMode {
|
| @@ -132,6 +145,12 @@ const CGFloat kShowFraction = 1.0;
|
| if (!inFullscreenMode_)
|
| return NO;
|
|
|
| + // Check if the fullscreen toolbar controller wants the toolbar to remain
|
| + // visible.
|
| + if ([visibilityLockController_ isToolbarVisibilityLockedForOwner:self]) {
|
| + return YES;
|
| + }
|
| +
|
| if (toolbarStyle_ == FullscreenToolbarStyle::TOOLBAR_PRESENT)
|
| return YES;
|
|
|
|
|