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

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

Issue 384105: Mac: Animate the bookmark bar showing/hiding. (Closed)
Patch Set: Comments added per rohitrao's review. 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
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/cocoa/bookmark_bar_bridge_unittest.mm » ('j') | 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 #import "base/cocoa_protocols_mac.h"
11 #include "base/scoped_nsobject.h" 11 #include "base/scoped_nsobject.h"
12 #import "chrome/browser/cocoa/background_gradient_view.h"
12 #import "chrome/browser/cocoa/view_resizer.h" 13 #import "chrome/browser/cocoa/view_resizer.h"
13 14
14 // A view that provides an animatable height property. Provides methods to 15 // A view that provides an animatable height property. Provides methods to
15 // animate to a new height, set a new height immediately, or cancel any running 16 // animate to a new height, set a new height immediately, or cancel any running
16 // animations. 17 // animations.
17 // 18 //
18 // AnimatableView sends an |animationDidEnd:| message to its delegate when the 19 // AnimatableView sends an |animationDidEnd:| message to its delegate when the
19 // animation ends normally and an |animationDidStop:| message when the animation 20 // animation ends normally and an |animationDidStop:| message when the animation
20 // was canceled (even when canceled as a result of a new animation starting). 21 // was canceled (even when canceled as a result of a new animation starting).
21 22
22 @interface AnimatableView : NSView<NSAnimationDelegate> { 23 @interface AnimatableView : BackgroundGradientView<NSAnimationDelegate> {
23 @protected 24 @protected
24 IBOutlet id delegate_; // weak, used to send animation ended messages. 25 IBOutlet id delegate_; // weak, used to send animation ended messages.
25 26
26 @private 27 @private
27 scoped_nsobject<NSAnimation> currentAnimation_; 28 scoped_nsobject<NSAnimation> currentAnimation_;
28 id<ViewResizer> resizeDelegate_; // weak, usually owns us 29 id<ViewResizer> resizeDelegate_; // weak, usually owns us
29 } 30 }
30 31
31 // Properties for bindings. 32 // Properties for bindings.
32 @property(assign) id delegate; 33 @property(assign) id delegate;
(...skipping 15 matching lines...) Expand all
48 // (mid-animation) height. 49 // (mid-animation) height.
49 - (void)stopAnimation; 50 - (void)stopAnimation;
50 51
51 // Sets the delegate that gets notified when this view needs to chanage its 52 // Sets the delegate that gets notified when this view needs to chanage its
52 // height. 53 // height.
53 - (void)setResizeDelegate:(id<ViewResizer>)resizeDelegate; 54 - (void)setResizeDelegate:(id<ViewResizer>)resizeDelegate;
54 55
55 @end 56 @end
56 57
57 #endif // CHROME_BROWSER_COCOA_ANIMATABLE_VIEW_H_ 58 #endif // CHROME_BROWSER_COCOA_ANIMATABLE_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/cocoa/bookmark_bar_bridge_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698