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

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

Issue 2271653006: base::mac::IsOSSierra() -> base::mac::IsOS10_12(), etc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Nits 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_fullscreen_transition.h" 5 #import "chrome/browser/ui/cocoa/browser_window_fullscreen_transition.h"
6 6
7 #include <QuartzCore/QuartzCore.h> 7 #include <QuartzCore/QuartzCore.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 [self takeSnapshot]; 232 [self takeSnapshot];
233 [self makeAndPrepareSnapshotWindow]; 233 [self makeAndPrepareSnapshotWindow];
234 return @[ primaryWindow_.get(), snapshotWindow_.get() ]; 234 return @[ primaryWindow_.get(), snapshotWindow_.get() ];
235 } 235 }
236 236
237 - (BOOL)isTransitionCompleted { 237 - (BOOL)isTransitionCompleted {
238 return completedTransition_; 238 return completedTransition_;
239 } 239 }
240 240
241 - (void)startCustomFullScreenAnimationWithDuration:(NSTimeInterval)duration { 241 - (void)startCustomFullScreenAnimationWithDuration:(NSTimeInterval)duration {
242 CGFloat durationFraction = base::mac::IsOSYosemite() 242 CGFloat durationFraction = base::mac::IsOS10_10()
243 ? kAnimationDurationFractionYosemite 243 ? kAnimationDurationFractionYosemite
244 : kAnimationDurationFraction; 244 : kAnimationDurationFraction;
245 CGFloat animationDuration = duration * durationFraction; 245 CGFloat animationDuration = duration * durationFraction;
246 [self preparePrimaryWindowForAnimation]; 246 [self preparePrimaryWindowForAnimation];
247 [self animatePrimaryWindowWithDuration:animationDuration]; 247 [self animatePrimaryWindowWithDuration:animationDuration];
248 [self animateSnapshotWindowWithDuration:animationDuration]; 248 [self animateSnapshotWindowWithDuration:animationDuration];
249 } 249 }
250 250
251 - (BOOL)shouldWindowBeUnconstrained { 251 - (BOOL)shouldWindowBeUnconstrained {
252 return changingPrimaryWindowSize_; 252 return changingPrimaryWindowSize_;
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 return [[[window contentView] superview] layer]; 550 return [[[window contentView] superview] layer];
551 } 551 }
552 552
553 - (NSPoint)pointRelativeToCurrentScreen:(NSPoint)point { 553 - (NSPoint)pointRelativeToCurrentScreen:(NSPoint)point {
554 NSRect screenFrame = [[primaryWindow_ screen] frame]; 554 NSRect screenFrame = [[primaryWindow_ screen] frame];
555 return NSMakePoint(point.x - screenFrame.origin.x, 555 return NSMakePoint(point.x - screenFrame.origin.x,
556 point.y - screenFrame.origin.y); 556 point.y - screenFrame.origin.y);
557 } 557 }
558 558
559 @end 559 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller_private.mm ('k') | chrome/browser/ui/cocoa/browser_window_layout.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698