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

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

Issue 2768843002: [Mac] Fullscreen Toolbar Fixes (Closed)
Patch Set: Created 3 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_private.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #import "base/auto_reset.h" 9 #import "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 [subviews addObject:[self tabContentArea]]; 961 [subviews addObject:[self tabContentArea]];
962 if ([findBarCocoaController_ view]) 962 if ([findBarCocoaController_ view])
963 [subviews addObject:[findBarCocoaController_ view]]; 963 [subviews addObject:[findBarCocoaController_ view]];
964 964
965 [self setContentViewSubviews:subviews]; 965 [self setContentViewSubviews:subviews];
966 } 966 }
967 967
968 - (void)updateSubviewZOrderFullscreen { 968 - (void)updateSubviewZOrderFullscreen {
969 base::scoped_nsobject<NSMutableArray> subviews([[NSMutableArray alloc] init]); 969 base::scoped_nsobject<NSMutableArray> subviews([[NSMutableArray alloc] init]);
970 970
971 // The infobar should overlay the toolbar if the toolbar is fully shown.
972 FullscreenToolbarLayout layout = [fullscreenToolbarController_ computeLayout];
973 BOOL shouldInfoBarOverlayToolbar =
974 ui::IsCGFloatEqual(layout.toolbarFraction, 1.0);
975
976 if ([downloadShelfController_ view]) 971 if ([downloadShelfController_ view])
977 [subviews addObject:[downloadShelfController_ view]]; 972 [subviews addObject:[downloadShelfController_ view]];
978 if ([self tabContentArea]) 973 if ([self tabContentArea])
979 [subviews addObject:[self tabContentArea]]; 974 [subviews addObject:[self tabContentArea]];
980 975
981 if (!shouldInfoBarOverlayToolbar && [infoBarContainerController_ view])
982 [subviews addObject:[infoBarContainerController_ view]];
983
984 if ([self placeBookmarkBarBelowInfoBar]) { 976 if ([self placeBookmarkBarBelowInfoBar]) {
985 if ([bookmarkBarController_ view]) 977 if ([bookmarkBarController_ view])
986 [subviews addObject:[bookmarkBarController_ view]]; 978 [subviews addObject:[bookmarkBarController_ view]];
987 if (floatingBarBackingView_) 979 if (floatingBarBackingView_)
988 [subviews addObject:floatingBarBackingView_]; 980 [subviews addObject:floatingBarBackingView_];
989 } else { 981 } else {
990 if (floatingBarBackingView_) 982 if (floatingBarBackingView_)
991 [subviews addObject:floatingBarBackingView_]; 983 [subviews addObject:floatingBarBackingView_];
992 if ([bookmarkBarController_ view]) 984 if ([bookmarkBarController_ view])
993 [subviews addObject:[bookmarkBarController_ view]]; 985 [subviews addObject:[bookmarkBarController_ view]];
994 } 986 }
995 987
996 if ([toolbarController_ view]) 988 if ([toolbarController_ view])
997 [subviews addObject:[toolbarController_ view]]; 989 [subviews addObject:[toolbarController_ view]];
998 990
999 if (shouldInfoBarOverlayToolbar && [infoBarContainerController_ view]) 991 if ([infoBarContainerController_ view])
1000 [subviews addObject:[infoBarContainerController_ view]]; 992 [subviews addObject:[infoBarContainerController_ view]];
1001 993
1002 if ([findBarCocoaController_ view]) 994 if ([findBarCocoaController_ view])
1003 [subviews addObject:[findBarCocoaController_ view]]; 995 [subviews addObject:[findBarCocoaController_ view]];
1004 996
1005 [self setContentViewSubviews:subviews]; 997 [self setContentViewSubviews:subviews];
1006 } 998 }
1007 999
1008 - (void)setContentViewSubviews:(NSArray*)subviews { 1000 - (void)setContentViewSubviews:(NSArray*)subviews {
1009 // Subviews already match. 1001 // Subviews already match.
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 if (fullscreenLowPowerCoordinator_) 1184 if (fullscreenLowPowerCoordinator_)
1193 fullscreenLowPowerCoordinator_->SetHasActiveSheet(false); 1185 fullscreenLowPowerCoordinator_->SetHasActiveSheet(false);
1194 } 1186 }
1195 1187
1196 - (void)childWindowsDidChange { 1188 - (void)childWindowsDidChange {
1197 if (fullscreenLowPowerCoordinator_) 1189 if (fullscreenLowPowerCoordinator_)
1198 fullscreenLowPowerCoordinator_->ChildWindowsChanged(); 1190 fullscreenLowPowerCoordinator_->ChildWindowsChanged();
1199 } 1191 }
1200 1192
1201 @end // @implementation BrowserWindowController(Private) 1193 @end // @implementation BrowserWindowController(Private)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698