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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 2086273003: [Mac] Reveal Fullscreen Toolbar for Tab Strip Changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed test Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698