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

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

Issue 2288003002: Delete IsAtLeastOS10_9() and IsAtMostOS10_9() (Closed)
Patch Set: Created 4 years, 3 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 (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 #import "base/auto_reset.h" 9 #import "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 // Add in the subviews above the tabContentArea. 1107 // Add in the subviews above the tabContentArea.
1108 for (NSUInteger i = index + 1; i < [subviews count]; ++i) { 1108 for (NSUInteger i = index + 1; i < [subviews count]; ++i) {
1109 NSView* view = [subviews objectAtIndex:i]; 1109 NSView* view = [subviews objectAtIndex:i];
1110 [self.chromeContentView addSubview:view 1110 [self.chromeContentView addSubview:view
1111 positioned:NSWindowAbove 1111 positioned:NSWindowAbove
1112 relativeTo:nil]; 1112 relativeTo:nil];
1113 } 1113 }
1114 } 1114 }
1115 1115
1116 + (BOOL)systemSettingsRequireMavericksAppKitFullscreenHack { 1116 + (BOOL)systemSettingsRequireMavericksAppKitFullscreenHack {
1117 if (!base::mac::IsOS10_9()) 1117 if (base::mac::IsAtLeastOS10_10())
Mark Mentovai 2016/08/29 17:57:56 I think that this kind of thing really was 10.9-sp
1118 return NO; 1118 return NO;
1119 return [NSScreen respondsToSelector:@selector(screensHaveSeparateSpaces)] && 1119 return [NSScreen respondsToSelector:@selector(screensHaveSeparateSpaces)] &&
1120 [NSScreen screensHaveSeparateSpaces]; 1120 [NSScreen screensHaveSeparateSpaces];
1121 } 1121 }
1122 1122
1123 - (BOOL)shouldUseMavericksAppKitFullscreenHack { 1123 - (BOOL)shouldUseMavericksAppKitFullscreenHack {
1124 if (![[self class] systemSettingsRequireMavericksAppKitFullscreenHack]) 1124 if (![[self class] systemSettingsRequireMavericksAppKitFullscreenHack])
1125 return NO; 1125 return NO;
1126 if (!enteringAppKitFullscreen_) 1126 if (!enteringAppKitFullscreen_)
1127 return NO; 1127 return NO;
1128 if (enteringAppKitFullscreenOnPrimaryScreen_) 1128 if (enteringAppKitFullscreenOnPrimaryScreen_)
1129 return NO; 1129 return NO;
1130 1130
1131 return YES; 1131 return YES;
1132 } 1132 }
1133 1133
1134 - (BOOL)shouldUseCustomAppKitFullscreenTransition:(BOOL)enterFullScreen { 1134 - (BOOL)shouldUseCustomAppKitFullscreenTransition:(BOOL)enterFullScreen {
1135 // Disable the custom exit animation in OSX 10.9: http://crbug.com/526327#c3. 1135 // Disable the custom exit animation in OSX 10.9: http://crbug.com/526327#c3.
1136 if (base::mac::IsOS10_9() && !enterFullScreen) 1136 if (!base::mac::IsAtLeastOS10_10() && !enterFullScreen)
1137 return NO; 1137 return NO;
1138 1138
1139 NSView* root = [[self.window contentView] superview]; 1139 NSView* root = [[self.window contentView] superview];
1140 if (!root.layer) 1140 if (!root.layer)
1141 return NO; 1141 return NO;
1142 1142
1143 // AppKit on OSX 10.9 has a bug for applications linked against OSX 10.8 SDK 1143 // AppKit on OSX 10.9 has a bug for applications linked against OSX 10.8 SDK
1144 // and earlier. Under specific circumstances, it prevents the custom AppKit 1144 // and earlier. Under specific circumstances, it prevents the custom AppKit
1145 // transition from working well. See http://crbug.com/396980 for more 1145 // transition from working well. See http://crbug.com/396980 for more
1146 // details. 1146 // details.
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 if (fullscreenLowPowerCoordinator_) 1266 if (fullscreenLowPowerCoordinator_)
1267 fullscreenLowPowerCoordinator_->SetHasActiveSheet(false); 1267 fullscreenLowPowerCoordinator_->SetHasActiveSheet(false);
1268 } 1268 }
1269 1269
1270 - (void)childWindowsDidChange { 1270 - (void)childWindowsDidChange {
1271 if (fullscreenLowPowerCoordinator_) 1271 if (fullscreenLowPowerCoordinator_)
1272 fullscreenLowPowerCoordinator_->ChildWindowsChanged(); 1272 fullscreenLowPowerCoordinator_->ChildWindowsChanged();
1273 } 1273 }
1274 1274
1275 @end // @implementation BrowserWindowController(Private) 1275 @end // @implementation BrowserWindowController(Private)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698