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