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

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

Issue 10037008: Fix window shadows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mark Created 8 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 | 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.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 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 initializing_ = YES; 226 initializing_ = YES;
227 browser_.reset(browser); 227 browser_.reset(browser);
228 ownsBrowser_ = ownIt; 228 ownsBrowser_ = ownIt;
229 NSWindow* window = [self window]; 229 NSWindow* window = [self window];
230 windowShim_.reset(new BrowserWindowCocoa(browser, self)); 230 windowShim_.reset(new BrowserWindowCocoa(browser, self));
231 231
232 // Create the bar visibility lock set; 10 is arbitrary, but should hopefully 232 // Create the bar visibility lock set; 10 is arbitrary, but should hopefully
233 // be big enough to hold all locks that'll ever be needed. 233 // be big enough to hold all locks that'll ever be needed.
234 barVisibilityLocks_.reset([[NSMutableSet setWithCapacity:10] retain]); 234 barVisibilityLocks_.reset([[NSMutableSet setWithCapacity:10] retain]);
235 235
236 // Sets the window to not have rounded corners, which prevents 236 // Set the window to not have rounded corners, which prevents the resize
237 // the resize control from being inset slightly and looking ugly. 237 // control from being inset slightly and looking ugly. Only bother to do
238 if ([window respondsToSelector:@selector(setBottomCornerRounded:)]) 238 // this on Snow Leopard and earlier; on Lion and later all windows have
239 // rounded bottom corners, and this won't work anyway.
240 if (base::mac::IsOSSnowLeopardOrEarlier() &&
241 [window respondsToSelector:@selector(setBottomCornerRounded:)])
Nico 2012/04/10 19:52:48 Is this part necessary? (just curious)
Avi (use Gerrit) 2012/04/10 20:11:23 I thought that it was and I changed it, but I beli
239 [window setBottomCornerRounded:NO]; 242 [window setBottomCornerRounded:NO];
240 243
241 // Lion will attempt to automagically save and restore the UI. This 244 // Lion will attempt to automagically save and restore the UI. This
242 // functionality appears to be leaky (or at least interacts badly with our 245 // functionality appears to be leaky (or at least interacts badly with our
243 // architecture) and thus BrowserWindowController never gets released. This 246 // architecture) and thus BrowserWindowController never gets released. This
244 // prevents the browser from being able to quit <http://crbug.com/79113>. 247 // prevents the browser from being able to quit <http://crbug.com/79113>.
245 if ([window respondsToSelector:@selector(setRestorable:)]) 248 if ([window respondsToSelector:@selector(setRestorable:)])
246 [window setRestorable:NO]; 249 [window setRestorable:NO];
247 250
248 // Get the windows to swish in on Lion. 251 // Get the windows to swish in on Lion.
(...skipping 1954 matching lines...) Expand 10 before | Expand all | Expand 10 after
2203 2206
2204 - (BOOL)supportsBookmarkBar { 2207 - (BOOL)supportsBookmarkBar {
2205 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2208 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2206 } 2209 }
2207 2210
2208 - (BOOL)isTabbedWindow { 2211 - (BOOL)isTabbedWindow {
2209 return browser_->is_type_tabbed(); 2212 return browser_->is_type_tabbed();
2210 } 2213 }
2211 2214
2212 @end // @implementation BrowserWindowController(WindowType) 2215 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_frame_view.mm ('k') | content/browser/renderer_host/accelerated_plugin_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698