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

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

Issue 2840073002: Revert of [Mac] Retain location bar focus on switching to fullscreen and back. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/toolbar/toolbar_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser_window_controller_private.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
index b0c8624d29568413e4cdfae604bcd17c7f658a2c..4936bae19d9419395420a7237dccca59b4383d14 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
@@ -1011,21 +1011,6 @@
return;
}
- // Removing the location bar from the window causes it to resign first
- // responder. Remember the location bar's focus state in order to restore
- // it before returning.
- BOOL locationBarHadFocus = [toolbarController_ locationBarHasFocus];
- FullscreenToolbarVisibilityLockController* visibilityLockController = nil;
- if (locationBarHadFocus) {
- // The location bar, by being focused, has a visibility lock on the toolbar,
- // and the location bar's removal from the view hierarchy will allow the
- // toolbar to hide. Create a temporary visibility lock on the toolbar for
- // the duration of the view hierarchy change.
- visibilityLockController = [self fullscreenToolbarVisibilityLockController];
- [visibilityLockController lockToolbarVisibilityForOwner:self
- withAnimation:NO];
- }
-
// Remove all subviews that aren't the tabContentArea.
for (NSView* view in [[[self.chromeContentView subviews] copy] autorelease]) {
if (view != tabContentArea)
@@ -1047,14 +1032,6 @@
[self.chromeContentView addSubview:view
positioned:NSWindowAbove
relativeTo:nil];
- }
-
- // Restore the location bar's focus state and remove the temporary visibility
- // lock.
- if (locationBarHadFocus) {
- [self focusLocationBar:YES];
- [visibilityLockController releaseToolbarVisibilityForOwner:self
- withAnimation:YES];
}
}
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/toolbar/toolbar_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698