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

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

Issue 1849343003: mac: Remove IsOSSnowLeopard(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 // Set different minimum sizes on tabbed windows vs non-tabbed, e.g. popups. 253 // Set different minimum sizes on tabbed windows vs non-tabbed, e.g. popups.
254 // This has to happen before -enforceMinWindowSize: is called further down. 254 // This has to happen before -enforceMinWindowSize: is called further down.
255 NSSize minSize = [self isTabbedWindow] ? 255 NSSize minSize = [self isTabbedWindow] ?
256 NSMakeSize(400, 272) : NSMakeSize(100, 122); 256 NSMakeSize(400, 272) : NSMakeSize(100, 122);
257 [[self window] setMinSize:minSize]; 257 [[self window] setMinSize:minSize];
258 258
259 // Create the bar visibility lock set; 10 is arbitrary, but should hopefully 259 // Create the bar visibility lock set; 10 is arbitrary, but should hopefully
260 // be big enough to hold all locks that'll ever be needed. 260 // be big enough to hold all locks that'll ever be needed.
261 barVisibilityLocks_.reset([[NSMutableSet setWithCapacity:10] retain]); 261 barVisibilityLocks_.reset([[NSMutableSet setWithCapacity:10] retain]);
262 262
263 // Set the window to not have rounded corners, which prevents the resize
264 // control from being inset slightly and looking ugly. Only bother to do
265 // this on Snow Leopard; on Lion and later all windows have rounded bottom
266 // corners, and this won't work anyway.
267 if (base::mac::IsOSSnowLeopard() &&
268 [window respondsToSelector:@selector(setBottomCornerRounded:)])
269 [window setBottomCornerRounded:NO];
270
271 // Lion will attempt to automagically save and restore the UI. This 263 // Lion will attempt to automagically save and restore the UI. This
272 // functionality appears to be leaky (or at least interacts badly with our 264 // functionality appears to be leaky (or at least interacts badly with our
273 // architecture) and thus BrowserWindowController never gets released. This 265 // architecture) and thus BrowserWindowController never gets released. This
274 // prevents the browser from being able to quit <http://crbug.com/79113>. 266 // prevents the browser from being able to quit <http://crbug.com/79113>.
275 if ([window respondsToSelector:@selector(setRestorable:)]) 267 if ([window respondsToSelector:@selector(setRestorable:)])
276 [window setRestorable:NO]; 268 [window setRestorable:NO];
277 269
278 // Get the windows to swish in on Lion. 270 // Get the windows to swish in on Lion.
279 if ([window respondsToSelector:@selector(setAnimationBehavior:)]) 271 if ([window respondsToSelector:@selector(setAnimationBehavior:)])
280 [window setAnimationBehavior:NSWindowAnimationBehaviorDocumentWindow]; 272 [window setAnimationBehavior:NSWindowAnimationBehaviorDocumentWindow];
(...skipping 1827 matching lines...) Expand 10 before | Expand all | Expand 10 after
2108 2100
2109 - (BOOL)isTabbedWindow { 2101 - (BOOL)isTabbedWindow {
2110 return browser_->is_type_tabbed(); 2102 return browser_->is_type_tabbed();
2111 } 2103 }
2112 2104
2113 - (NSRect)savedRegularWindowFrame { 2105 - (NSRect)savedRegularWindowFrame {
2114 return savedRegularWindowFrame_; 2106 return savedRegularWindowFrame_;
2115 } 2107 }
2116 2108
2117 @end // @implementation BrowserWindowController(WindowType) 2109 @end // @implementation BrowserWindowController(WindowType)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698