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

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

Issue 2435593008: Cocoa: Fix a constraint violation when navigating away from a detached bookmark bar. (Closed)
Patch Set: redundant Created 4 years, 2 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
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 974
975 - (void)applyLayout:(BrowserWindowLayout*)layout { 975 - (void)applyLayout:(BrowserWindowLayout*)layout {
976 chrome::LayoutOutput output = [layout computeLayout]; 976 chrome::LayoutOutput output = [layout computeLayout];
977 977
978 if (!NSIsEmptyRect(output.tabStripLayout.frame)) 978 if (!NSIsEmptyRect(output.tabStripLayout.frame))
979 [self applyTabStripLayout:output.tabStripLayout]; 979 [self applyTabStripLayout:output.tabStripLayout];
980 980
981 if (!NSIsEmptyRect(output.toolbarFrame)) 981 if (!NSIsEmptyRect(output.toolbarFrame))
982 [[toolbarController_ view] setFrame:output.toolbarFrame]; 982 [[toolbarController_ view] setFrame:output.toolbarFrame];
983 983
984 if (!NSIsEmptyRect(output.bookmarkFrame)) { 984 if (!NSIsEmptyRect(output.bookmarkFrame))
985 NSView* bookmarkBarView = [bookmarkBarController_ view]; 985 [bookmarkBarController_ layoutToFrame:output.bookmarkFrame];
tapted 2016/10/21 04:51:30 confusingly, this was not a `BookmarkBarView*`, bu
986 [bookmarkBarView setFrame:output.bookmarkFrame];
987
988 // Pin the bookmark bar to the top of the window and make the width
989 // flexible.
990 [bookmarkBarView setAutoresizingMask:NSViewWidthSizable | NSViewMinYMargin];
991
992 [bookmarkBarController_ layoutSubviews];
993 }
994 986
995 // The info bar is never hidden. Sometimes it has zero effective height. 987 // The info bar is never hidden. Sometimes it has zero effective height.
996 [[infoBarContainerController_ view] setFrame:output.infoBarFrame]; 988 [[infoBarContainerController_ view] setFrame:output.infoBarFrame];
997 [infoBarContainerController_ 989 [infoBarContainerController_
998 setMaxTopArrowHeight:output.infoBarMaxTopArrowHeight]; 990 setMaxTopArrowHeight:output.infoBarMaxTopArrowHeight];
999 [infoBarContainerController_ 991 [infoBarContainerController_
1000 setInfobarArrowX:[self locationBarBridge]->GetPageInfoBubblePoint().x]; 992 setInfobarArrowX:[self locationBarBridge]->GetPageInfoBubblePoint().x];
1001 993
1002 if (!NSIsEmptyRect(output.downloadShelfFrame)) 994 if (!NSIsEmptyRect(output.downloadShelfFrame))
1003 [[downloadShelfController_ view] setFrame:output.downloadShelfFrame]; 995 [[downloadShelfController_ view] setFrame:output.downloadShelfFrame];
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 if (fullscreenLowPowerCoordinator_) 1254 if (fullscreenLowPowerCoordinator_)
1263 fullscreenLowPowerCoordinator_->SetHasActiveSheet(false); 1255 fullscreenLowPowerCoordinator_->SetHasActiveSheet(false);
1264 } 1256 }
1265 1257
1266 - (void)childWindowsDidChange { 1258 - (void)childWindowsDidChange {
1267 if (fullscreenLowPowerCoordinator_) 1259 if (fullscreenLowPowerCoordinator_)
1268 fullscreenLowPowerCoordinator_->ChildWindowsChanged(); 1260 fullscreenLowPowerCoordinator_->ChildWindowsChanged();
1269 } 1261 }
1270 1262
1271 @end // @implementation BrowserWindowController(Private) 1263 @end // @implementation BrowserWindowController(Private)
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698