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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 2296903002: [Mac] Fullscreen Toolbar Edge Cases (Closed)
Patch Set: Fixed an edge case Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <numeric> 8 #include <numeric>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1966 matching lines...) Expand 10 before | Expand all | Expand 10 after
1977 : [barVisibilityLocks_ count]; 1977 : [barVisibilityLocks_ count];
1978 } 1978 }
1979 1979
1980 - (void)lockBarVisibilityForOwner:(id)owner withAnimation:(BOOL)animate { 1980 - (void)lockBarVisibilityForOwner:(id)owner withAnimation:(BOOL)animate {
1981 if (![self isBarVisibilityLockedForOwner:owner]) { 1981 if (![self isBarVisibilityLockedForOwner:owner]) {
1982 [barVisibilityLocks_ addObject:owner]; 1982 [barVisibilityLocks_ addObject:owner];
1983 1983
1984 // If enabled, show the overlay if necessary (and if the fullscreen 1984 // If enabled, show the overlay if necessary (and if the fullscreen
1985 // toolbar is hidden). 1985 // toolbar is hidden).
1986 if (barVisibilityUpdatesEnabled_) { 1986 if (barVisibilityUpdatesEnabled_) {
1987 [fullscreenToolbarController_ ensureOverlayShownWithAnimation:animate]; 1987 [fullscreenToolbarController_ lockBarVisibilityWithAnimation:animate];
1988 } 1988 }
1989 } 1989 }
1990 } 1990 }
1991 1991
1992 - (void)releaseBarVisibilityForOwner:(id)owner withAnimation:(BOOL)animate { 1992 - (void)releaseBarVisibilityForOwner:(id)owner withAnimation:(BOOL)animate {
1993 if ([self isBarVisibilityLockedForOwner:owner]) { 1993 if ([self isBarVisibilityLockedForOwner:owner]) {
1994 [barVisibilityLocks_ removeObject:owner]; 1994 [barVisibilityLocks_ removeObject:owner];
1995 1995
1996 // If enabled, hide the overlay if necessary (and if the fullscreen 1996 // If enabled, hide the overlay if necessary (and if the fullscreen
1997 // toolbar is hidden). 1997 // toolbar is hidden).
1998 if (barVisibilityUpdatesEnabled_ && 1998 if (barVisibilityUpdatesEnabled_ &&
1999 ![barVisibilityLocks_ count]) { 1999 ![barVisibilityLocks_ count]) {
2000 [fullscreenToolbarController_ ensureOverlayHiddenWithAnimation:animate]; 2000 [fullscreenToolbarController_ releaseBarVisibilityWithAnimation:animate];
2001 } 2001 }
2002 } 2002 }
2003 } 2003 }
2004 2004
2005 - (BOOL)floatingBarHasFocus { 2005 - (BOOL)floatingBarHasFocus {
2006 NSResponder* focused = [[self window] firstResponder]; 2006 NSResponder* focused = [[self window] firstResponder];
2007 return [focused isKindOfClass:[AutocompleteTextFieldEditor class]]; 2007 return [focused isKindOfClass:[AutocompleteTextFieldEditor class]];
2008 } 2008 }
2009 2009
2010 - (ExclusiveAccessController*)exclusiveAccessController { 2010 - (ExclusiveAccessController*)exclusiveAccessController {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
2043 2043
2044 - (NSRect)savedRegularWindowFrame { 2044 - (NSRect)savedRegularWindowFrame {
2045 return savedRegularWindowFrame_; 2045 return savedRegularWindowFrame_;
2046 } 2046 }
2047 2047
2048 - (BOOL)isFullscreenTransitionInProgress { 2048 - (BOOL)isFullscreenTransitionInProgress {
2049 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_; 2049 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_;
2050 } 2050 }
2051 2051
2052 @end // @implementation BrowserWindowController(WindowType) 2052 @end // @implementation BrowserWindowController(WindowType)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698