Chromium Code Reviews| 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]) { |
|
spqchan
2017/02/08 19:21:51
Would it possible to move this out of fullscreen_t
shrike
2017/02/08 19:51:42
I could maybe do that with a fourth toolbar style
spqchan
2017/02/09 01:50:34
Will something like this work?
In browser_window_
shrike
2017/02/09 02:18:29
This may work, but unfortunately I still need a ch
spqchan
2017/02/09 05:09:36
Ah gotcha, so we're locking the toolbar as a speci
|
| + [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]) { |
|
spqchan
2017/02/08 19:21:51
Remove: This is redundant, L163 should cover this.
shrike
2017/02/08 19:51:42
I have to have this here, otherwise the code early
spqchan
2017/02/09 01:50:34
I'm a bit confused, why do you want to show the to
shrike
2017/02/09 02:18:29
If the toolbar is TOOLBAR_NONE then the toolbar sh
spqchan
2017/02/09 05:09:36
See comment from above.
|
| + return YES; |
| + } |
| + |
| if (toolbarStyle_ == FullscreenToolbarStyle::TOOLBAR_PRESENT) |
| return YES; |