| OLD | NEW |
| 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 Loading... |
| 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_ showToolbarIfPossibleWithAnimation: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. |
| 1997 // toolbar is hidden). | |
| 1998 if (barVisibilityUpdatesEnabled_ && | 1997 if (barVisibilityUpdatesEnabled_ && |
| 1999 ![barVisibilityLocks_ count]) { | 1998 ![barVisibilityLocks_ count]) { |
| 2000 [fullscreenToolbarController_ ensureOverlayHiddenWithAnimation:animate]; | 1999 [fullscreenToolbarController_ hideToolbarIfPossibleWithAnimation:animate]; |
| 2001 } | 2000 } |
| 2002 } | 2001 } |
| 2003 } | 2002 } |
| 2004 | 2003 |
| 2005 - (BOOL)floatingBarHasFocus { | 2004 - (BOOL)floatingBarHasFocus { |
| 2006 NSResponder* focused = [[self window] firstResponder]; | 2005 NSResponder* focused = [[self window] firstResponder]; |
| 2007 return [focused isKindOfClass:[AutocompleteTextFieldEditor class]]; | 2006 return [focused isKindOfClass:[AutocompleteTextFieldEditor class]]; |
| 2008 } | 2007 } |
| 2009 | 2008 |
| 2010 - (ExclusiveAccessController*)exclusiveAccessController { | 2009 - (ExclusiveAccessController*)exclusiveAccessController { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2043 | 2042 |
| 2044 - (NSRect)savedRegularWindowFrame { | 2043 - (NSRect)savedRegularWindowFrame { |
| 2045 return savedRegularWindowFrame_; | 2044 return savedRegularWindowFrame_; |
| 2046 } | 2045 } |
| 2047 | 2046 |
| 2048 - (BOOL)isFullscreenTransitionInProgress { | 2047 - (BOOL)isFullscreenTransitionInProgress { |
| 2049 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_; | 2048 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_; |
| 2050 } | 2049 } |
| 2051 | 2050 |
| 2052 @end // @implementation BrowserWindowController(WindowType) | 2051 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |