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

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

Issue 2272783002: [Mac] Fix for fullscreen toolbar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed browserwindowlayout unit_tests 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 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after
1972 DCHECK([self isInAnyFullscreenMode]); 1972 DCHECK([self isInAnyFullscreenMode]);
1973 if (![self isInAnyFullscreenMode]) 1973 if (![self isInAnyFullscreenMode])
1974 return; 1974 return;
1975 1975
1976 NSWindow* window = [self window]; 1976 NSWindow* window = [self window];
1977 [window setFrame:[[window screen] frame] display:YES]; 1977 [window setFrame:[[window screen] frame] display:YES];
1978 [self layoutSubviews]; 1978 [self layoutSubviews];
1979 } 1979 }
1980 1980
1981 - (BOOL)isBarVisibilityLockedForOwner:(id)owner { 1981 - (BOOL)isBarVisibilityLockedForOwner:(id)owner {
1982 DCHECK(owner);
1983 DCHECK(barVisibilityLocks_); 1982 DCHECK(barVisibilityLocks_);
1984 return [barVisibilityLocks_ containsObject:owner]; 1983 return owner ? [barVisibilityLocks_ containsObject:owner]
1984 : [barVisibilityLocks_ count];
1985 } 1985 }
1986 1986
1987 - (void)lockBarVisibilityForOwner:(id)owner withAnimation:(BOOL)animate { 1987 - (void)lockBarVisibilityForOwner:(id)owner withAnimation:(BOOL)animate {
1988 if (![self isBarVisibilityLockedForOwner:owner]) { 1988 if (![self isBarVisibilityLockedForOwner:owner]) {
1989 [barVisibilityLocks_ addObject:owner]; 1989 [barVisibilityLocks_ addObject:owner];
1990 1990
1991 // If enabled, show the overlay if necessary (and if the fullscreen 1991 // If enabled, show the overlay if necessary (and if the fullscreen
1992 // toolbar is hidden). 1992 // toolbar is hidden).
1993 if (barVisibilityUpdatesEnabled_) { 1993 if (barVisibilityUpdatesEnabled_) {
1994 [fullscreenToolbarController_ ensureOverlayShownWithAnimation:animate]; 1994 [fullscreenToolbarController_ ensureOverlayShownWithAnimation:animate];
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
2050 2050
2051 - (NSRect)savedRegularWindowFrame { 2051 - (NSRect)savedRegularWindowFrame {
2052 return savedRegularWindowFrame_; 2052 return savedRegularWindowFrame_;
2053 } 2053 }
2054 2054
2055 - (BOOL)isFullscreenTransitionInProgress { 2055 - (BOOL)isFullscreenTransitionInProgress {
2056 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_; 2056 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_;
2057 } 2057 }
2058 2058
2059 @end // @implementation BrowserWindowController(WindowType) 2059 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.h ('k') | chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698