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

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

Issue 878673006: Reland "mac: Layer back the root view of the browser window on OSX 10.9+." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | chrome/browser/ui/cocoa/browser_window_controller_private.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 bool hasTabStrip = browser->SupportsWindowFeature(Browser::FEATURE_TABSTRIP); 248 bool hasTabStrip = browser->SupportsWindowFeature(Browser::FEATURE_TABSTRIP);
249 if ((self = [super initTabWindowControllerWithTabStrip:hasTabStrip])) { 249 if ((self = [super initTabWindowControllerWithTabStrip:hasTabStrip])) {
250 DCHECK(browser); 250 DCHECK(browser);
251 initializing_ = YES; 251 initializing_ = YES;
252 browser_.reset(browser); 252 browser_.reset(browser);
253 ownsBrowser_ = ownIt; 253 ownsBrowser_ = ownIt;
254 NSWindow* window = [self window]; 254 NSWindow* window = [self window];
255 // Make the content view for the window have a layer. This will make all 255 // Make the content view for the window have a layer. This will make all
256 // sub-views have layers. This is necessary to ensure correct layer 256 // sub-views have layers. This is necessary to ensure correct layer
257 // ordering of all child views and their layers. 257 // ordering of all child views and their layers.
258 [[window contentView] setWantsLayer:YES]; 258 if ([self wantsRootViewToBeLayerBacked])
259 [[[window contentView] superview] setWantsLayer:YES];
260 else
261 [[window contentView] setWantsLayer:YES];
259 windowShim_.reset(new BrowserWindowCocoa(browser, self)); 262 windowShim_.reset(new BrowserWindowCocoa(browser, self));
260 263
261 // Set different minimum sizes on tabbed windows vs non-tabbed, e.g. popups. 264 // Set different minimum sizes on tabbed windows vs non-tabbed, e.g. popups.
262 // This has to happen before -enforceMinWindowSize: is called further down. 265 // This has to happen before -enforceMinWindowSize: is called further down.
263 NSSize minSize = [self isTabbedWindow] ? 266 NSSize minSize = [self isTabbedWindow] ?
264 NSMakeSize(400, 272) : NSMakeSize(100, 122); 267 NSMakeSize(400, 272) : NSMakeSize(100, 122);
265 [[self window] setMinSize:minSize]; 268 [[self window] setMinSize:minSize];
266 269
267 // Create the bar visibility lock set; 10 is arbitrary, but should hopefully 270 // Create the bar visibility lock set; 10 is arbitrary, but should hopefully
268 // be big enough to hold all locks that'll ever be needed. 271 // be big enough to hold all locks that'll ever be needed.
(...skipping 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after
2238 2241
2239 - (BOOL)supportsBookmarkBar { 2242 - (BOOL)supportsBookmarkBar {
2240 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2243 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2241 } 2244 }
2242 2245
2243 - (BOOL)isTabbedWindow { 2246 - (BOOL)isTabbedWindow {
2244 return browser_->is_type_tabbed(); 2247 return browser_->is_type_tabbed();
2245 } 2248 }
2246 2249
2247 @end // @implementation BrowserWindowController(WindowType) 2250 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser_window_controller_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698