| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_UI_COCOA_ANIMATABLE_IMAGE_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_ANIMATABLE_IMAGE_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_ANIMATABLE_IMAGE_H_ | 6 #define CHROME_BROWSER_UI_COCOA_ANIMATABLE_IMAGE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
| 10 #import <QuartzCore/QuartzCore.h> | 10 #import <QuartzCore/QuartzCore.h> |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 CGRect endFrame_; | 29 CGRect endFrame_; |
| 30 | 30 |
| 31 // Opacity values for the animation. | 31 // Opacity values for the animation. |
| 32 CGFloat startOpacity_; | 32 CGFloat startOpacity_; |
| 33 CGFloat endOpacity_; | 33 CGFloat endOpacity_; |
| 34 | 34 |
| 35 // The amount of time it takes to animate the image. | 35 // The amount of time it takes to animate the image. |
| 36 CGFloat duration_; | 36 CGFloat duration_; |
| 37 } | 37 } |
| 38 | 38 |
| 39 @property (nonatomic) CGRect startFrame; | 39 @property(nonatomic) CGRect startFrame; |
| 40 @property (nonatomic) CGRect endFrame; | 40 @property(nonatomic) CGRect endFrame; |
| 41 @property (nonatomic) CGFloat startOpacity; | 41 @property(nonatomic) CGFloat startOpacity; |
| 42 @property (nonatomic) CGFloat endOpacity; | 42 @property(nonatomic) CGFloat endOpacity; |
| 43 @property (nonatomic) CGFloat duration; | 43 @property(nonatomic) CGFloat duration; |
| 44 | 44 |
| 45 // Designated initializer. Do not use any other NSWindow initializers. Creates | 45 // Designated initializer. Do not use any other NSWindow initializers. Creates |
| 46 // but does not show the blank animation window of the given size. The | 46 // but does not show the blank animation window of the given size. The |
| 47 // |animationFrame| should usually be big enough to contain the |startFrame| | 47 // |animationFrame| should usually be big enough to contain the |startFrame| |
| 48 // and |endFrame| properties of the animation. | 48 // and |endFrame| properties of the animation. |
| 49 - (id)initWithImage:(NSImage*)image | 49 - (id)initWithImage:(NSImage*)image |
| 50 animationFrame:(NSRect)animationFrame; | 50 animationFrame:(NSRect)animationFrame; |
| 51 | 51 |
| 52 // Begins the animation. | 52 // Begins the animation. |
| 53 - (void)startAnimation; | 53 - (void)startAnimation; |
| 54 | 54 |
| 55 @end | 55 @end |
| 56 | 56 |
| 57 #endif // CHROME_BROWSER_UI_COCOA_ANIMATABLE_IMAGE_H_ | 57 #endif // CHROME_BROWSER_UI_COCOA_ANIMATABLE_IMAGE_H_ |
| OLD | NEW |