| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 #import <QuartzCore/QuartzCore.h> | 6 #import <QuartzCore/QuartzCore.h> |
| 7 | 7 |
| 8 #import "chrome/browser/ui/cocoa/animatable_view.h" | 8 #import "chrome/browser/ui/cocoa/animatable_view.h" |
| 9 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" | 9 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSAnimation+Duration.h
" |
| 10 | 10 |
| 11 // NSAnimation subclass that animates the height of an AnimatableView. Allows | 11 // NSAnimation subclass that animates the height of an AnimatableView. Allows |
| 12 // the caller to start and cancel the animation as desired. | 12 // the caller to start and cancel the animation as desired. |
| 13 @interface HeightAnimation : NSAnimation { | 13 @interface HeightAnimation : NSAnimation { |
| 14 @private | 14 @private |
| 15 AnimatableView* view_; // weak, owns us. | 15 AnimatableView* view_; // weak, owns us. |
| 16 CGFloat startHeight_; | 16 CGFloat startHeight_; |
| 17 CGFloat endHeight_; | 17 CGFloat endHeight_; |
| 18 } | 18 } |
| 19 | 19 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 - (void)animationDidEnd:(NSAnimation*)animation { | 101 - (void)animationDidEnd:(NSAnimation*)animation { |
| 102 if ([resizeDelegate_ respondsToSelector:@selector(setAnimationInProgress:)]) | 102 if ([resizeDelegate_ respondsToSelector:@selector(setAnimationInProgress:)]) |
| 103 [resizeDelegate_ setAnimationInProgress:NO]; | 103 [resizeDelegate_ setAnimationInProgress:NO]; |
| 104 if ([delegate_ respondsToSelector:@selector(animationDidEnd:)]) | 104 if ([delegate_ respondsToSelector:@selector(animationDidEnd:)]) |
| 105 [delegate_ animationDidEnd:animation]; | 105 [delegate_ animationDidEnd:animation]; |
| 106 currentAnimation_.reset(nil); | 106 currentAnimation_.reset(nil); |
| 107 } | 107 } |
| 108 | 108 |
| 109 @end | 109 @end |
| OLD | NEW |