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

Side by Side Diff: chrome/browser/cocoa/animatable_view.h

Issue 360014: AnimatableView needs to be an NSAnimationDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROME_BROWSER_COCOA_ANIMATABLE_VIEW_H_ 5 #ifndef CHROME_BROWSER_COCOA_ANIMATABLE_VIEW_H_
6 #define CHROME_BROWSER_COCOA_ANIMATABLE_VIEW_H_ 6 #define CHROME_BROWSER_COCOA_ANIMATABLE_VIEW_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #import "base/cocoa_protocols_mac.h"
10 #include "base/scoped_nsobject.h" 11 #include "base/scoped_nsobject.h"
11 #import "chrome/browser/cocoa/view_resizer.h" 12 #import "chrome/browser/cocoa/view_resizer.h"
12 13
13 // A view that provides an animatable height property. Provides methods to 14 // A view that provides an animatable height property. Provides methods to
14 // animate to a new height, set a new height immediately, or cancel any running 15 // animate to a new height, set a new height immediately, or cancel any running
15 // animations. 16 // animations.
16 // 17 //
17 // AnimatableView sends an |animationDidEnd:| message to its delegate when the 18 // AnimatableView sends an |animationDidEnd:| message to its delegate when the
18 // animation ends normally and an |animationDidStop:| message when the animation 19 // animation ends normally and an |animationDidStop:| message when the animation
19 // was canceled (even when canceled as a result of a new animation starting). 20 // was canceled (even when canceled as a result of a new animation starting).
20 21
21 @interface AnimatableView : NSView { 22 @interface AnimatableView : NSView<NSAnimationDelegate> {
22 @protected 23 @protected
23 IBOutlet id delegate_; // weak, used to send animation ended messages. 24 IBOutlet id delegate_; // weak, used to send animation ended messages.
24 25
25 @private 26 @private
26 scoped_nsobject<NSAnimation> currentAnimation_; 27 scoped_nsobject<NSAnimation> currentAnimation_;
27 id<ViewResizer> resizeDelegate_; // weak, usually owns us 28 id<ViewResizer> resizeDelegate_; // weak, usually owns us
28 } 29 }
29 30
30 // Properties for bindings. 31 // Properties for bindings.
31 @property(assign) id delegate; 32 @property(assign) id delegate;
(...skipping 15 matching lines...) Expand all
47 // (mid-animation) height. 48 // (mid-animation) height.
48 - (void)stopAnimation; 49 - (void)stopAnimation;
49 50
50 // Sets the delegate that gets notified when this view needs to chanage its 51 // Sets the delegate that gets notified when this view needs to chanage its
51 // height. 52 // height.
52 - (void)setResizeDelegate:(id<ViewResizer>)resizeDelegate; 53 - (void)setResizeDelegate:(id<ViewResizer>)resizeDelegate;
53 54
54 @end 55 @end
55 56
56 #endif // CHROME_BROWSER_COCOA_ANIMATABLE_VIEW_H_ 57 #endif // CHROME_BROWSER_COCOA_ANIMATABLE_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698