Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / sprite_view.h
blob1815a03f301e43286e9d91d5a12a6362837c430e
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_;
21 // |image| contains square sprites in a horizontal strip.
22 // The sprites will be animated, with each sprite shown for 30ms.
23 // It is OK to pass in a single sprite (a square image), in which case there
24 // will be no animation.
25 - (void)setImage:(NSImage*)image;
27 // Same as above, with a toast animation to transition to the new image.
28 // The old image will animate to the bottom, and then the new image will
29 // animate back up to position.
30 - (void)setImage:(NSImage*)image withToastAnimation:(BOOL)animate;
32 @end
34 #endif // CHROME_BROWSER_UI_COCOA_TABS_THROBBER_VIEW_H_