Cleanup: Update the path to insets and point headers.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / sprite_view.h
blob4ab2bd1834d0e656392ec340e5f611a8cb20174f
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_COCOA_SPRITE_VIEW_H_
6 #define CHROME_BROWSER_UI_COCOA_SPRITE_VIEW_H_
8 #import <Cocoa/Cocoa.h>
10 #include "base/mac/scoped_nsobject.h"
12 @class CAKeyframeAnimation;
14 // A class that knows how to repeatedly animate sprites from an image containing
15 // the sprites in the form of a horizontal strip.
16 @interface SpriteView : NSView {
17 @private
18 base::scoped_nsobject<CAKeyframeAnimation> spriteAnimation_;
19 CALayer* imageLayer_;
22 // |image| contains square sprites in a horizontal strip.
23 // The sprites will be animated, with each sprite shown for 30ms.
24 // It is OK to pass in a single sprite (a square image), in which case there
25 // will be no animation.
26 - (void)setImage:(NSImage*)image;
28 // Same as above, with a toast animation to transition to the new image.
29 // The old image will animate to the bottom, and then the new image will
30 // animate back up to position.
31 - (void)setImage:(NSImage*)image withToastAnimation:(BOOL)animate;
33 @end
35 #endif // CHROME_BROWSER_UI_COCOA_TABS_THROBBER_VIEW_H_