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 #ifndef CHROME_BROWSER_COCOA_THROBBER_VIEW_H_ | 5 #ifndef CHROME_BROWSER_COCOA_THROBBER_VIEW_H_ |
6 #define CHROME_BROWSER_COCOA_THROBBER_VIEW_H_ | 6 #define CHROME_BROWSER_COCOA_THROBBER_VIEW_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/scoped_nsobject.h" | 10 #include "base/scoped_nsobject.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 unsigned int numFrames_; // Number of frames in this animation. | 25 unsigned int numFrames_; // Number of frames in this animation. |
26 unsigned int animationFrame_; // Current frame of the animation, | 26 unsigned int animationFrame_; // Current frame of the animation, |
27 // [0..numFrames_) | 27 // [0..numFrames_) |
28 } | 28 } |
29 | 29 |
30 // Creates the view with |frame| and the image strip desginated by |image|. The | 30 // Creates the view with |frame| and the image strip desginated by |image|. The |
31 // image needs to be made of squares such that the height divides evently into | 31 // image needs to be made of squares such that the height divides evently into |
32 // the width. Takes ownership of |image|. | 32 // the width. Takes ownership of |image|. |
33 - (id)initWithFrame:(NSRect)frame image:(NSImage*)image; | 33 - (id)initWithFrame:(NSRect)frame image:(NSImage*)image; |
34 | 34 |
| 35 // Allows changing the image once the view has been created, such as when the |
| 36 // view is loaded from a nib. The same restrictions as above apply. |
| 37 - (void)setImage:(NSImage*)image; |
| 38 |
35 @end | 39 @end |
36 | 40 |
37 #endif // CHROME_BROWSER_COCOA_THROBBER_VIEW_H_ | 41 #endif // CHROME_BROWSER_COCOA_THROBBER_VIEW_H_ |
OLD | NEW |