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

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

Issue 252233003: Reapply 266653 "[Mac] Allow fullscreen transitions while constrai..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #import "base/mac/scoped_nsobject.h" 10 #import "base/mac/scoped_nsobject.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 // Place the download shelf, if any, at the bottom of the view. 270 // Place the download shelf, if any, at the bottom of the view.
271 minY = [self layoutDownloadShelfAtMinX:minX minY:minY width:width]; 271 minY = [self layoutDownloadShelfAtMinX:minX minY:minY width:width];
272 272
273 // Finally, the content area takes up all of the remaining space. 273 // Finally, the content area takes up all of the remaining space.
274 NSRect contentAreaRect = NSMakeRect(minX, minY, width, maxY - minY); 274 NSRect contentAreaRect = NSMakeRect(minX, minY, width, maxY - minY);
275 [self layoutTabContentArea:contentAreaRect]; 275 [self layoutTabContentArea:contentAreaRect];
276 276
277 // Normally, we don't need to tell the toolbar whether or not to show the 277 // Normally, we don't need to tell the toolbar whether or not to show the
278 // divider, but things break down during animation. 278 // divider, but things break down during animation.
279 [toolbarController_ setDividerOpacity:[self toolbarDividerOpacity]]; 279 [toolbarController_ setDividerOpacity:[self toolbarDividerOpacity]];
280
281 // Update the position of the active constrained window sheet. We force this
282 // here because the |sheetParentView| may not have been resized (e.g., to
283 // prevent jank during a fullscreen mode transition), but constrained window
284 // sheets also compute their position based on the bookmark bar and toolbar.
285 content::WebContents* const activeWebContents =
286 browser_->tab_strip_model()->GetActiveWebContents();
287 NSView* const sheetParentView = activeWebContents ?
288 GetSheetParentViewForWebContents(activeWebContents) : nil;
289 if (sheetParentView) {
290 [[NSNotificationCenter defaultCenter]
291 postNotificationName:NSViewFrameDidChangeNotification
292 object:sheetParentView];
293 }
280 } 294 }
281 295
282 - (CGFloat)floatingBarHeight { 296 - (CGFloat)floatingBarHeight {
283 if (![self inPresentationMode]) 297 if (![self inPresentationMode])
284 return 0; 298 return 0;
285 299
286 CGFloat totalHeight = [presentationModeController_ floatingBarVerticalOffset]; 300 CGFloat totalHeight = [presentationModeController_ floatingBarVerticalOffset];
287 301
288 if ([self hasTabStrip]) 302 if ([self hasTabStrip])
289 totalHeight += NSHeight([[self tabStripView] frame]); 303 totalHeight += NSHeight([[self tabStripView] frame]);
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 } 1009 }
996 } 1010 }
997 1011
998 - (void)updateInfoBarTipVisibility { 1012 - (void)updateInfoBarTipVisibility {
999 // If there's no toolbar then hide the infobar tip. 1013 // If there's no toolbar then hide the infobar tip.
1000 [infoBarContainerController_ 1014 [infoBarContainerController_
1001 setShouldSuppressTopInfoBarTip:![self hasToolbar]]; 1015 setShouldSuppressTopInfoBarTip:![self hasToolbar]];
1002 } 1016 }
1003 1017
1004 @end // @implementation BrowserWindowController(Private) 1018 @end // @implementation BrowserWindowController(Private)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698