OLD | NEW |
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 Loading... |
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) |
OLD | NEW |