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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller_private.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 | « chrome/browser/ui/cocoa/browser_window_controller_private.h ('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 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/mac/bind_objc_block.h" 10 #include "base/mac/bind_objc_block.h"
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 startCustomAnimationToEnterFullScreenWithDuration:duration]; 1065 startCustomAnimationToEnterFullScreenWithDuration:duration];
1066 } 1066 }
1067 1067
1068 - (BOOL)shouldConstrainFrameRect { 1068 - (BOOL)shouldConstrainFrameRect {
1069 if ([enterFullscreenTransition_ shouldWindowBeUnconstrained]) 1069 if ([enterFullscreenTransition_ shouldWindowBeUnconstrained])
1070 return NO; 1070 return NO;
1071 1071
1072 return [super shouldConstrainFrameRect]; 1072 return [super shouldConstrainFrameRect];
1073 } 1073 }
1074 1074
1075 - (BOOL)wantsRootViewToBeLayerBacked {
1076 // This class always layer-backs the contentView of the window. If Chrome
1077 // were linked against OSX 10.9, this would also cause the root view to be
1078 // layer backed. Since Chrome is linked against OSX 10.6, the root view by
1079 // default is not layer backed.
1080
1081 // This class is going to have a custom AppKit fullscreen animation, which
1082 // requires that the root view is layer backed. To be safe, this class will
1083 // only layer-back the root view on OSX 10.9+.
1084 return base::mac::IsOSMavericksOrLater();
1085 }
1086
1075 @end // @implementation BrowserWindowController(Private) 1087 @end // @implementation BrowserWindowController(Private)
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller_private.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698