1 // Copyright (c) 2011 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_TABS_THROBBER_VIEW_H_
6 #define CHROME_BROWSER_UI_COCOA_TABS_THROBBER_VIEW_H_
8 #import <Cocoa/Cocoa.h>
10 @protocol ThrobberDataDelegate
;
12 // A class that knows how to draw an animated state to indicate progress.
13 // Creating the class starts the animation, destroying it stops it. There are
16 // - Filmstrip: Draws via a sequence of frames in an image. There is no state
17 // where the class is frozen on an image and not animating. The image needs to
18 // be made of squares such that the height divides evenly into the width.
20 // - Toast: Draws an image animating down to the bottom and then another image
21 // animating up from the bottom. Stops once the animation is complete.
23 @interface ThrobberView
: NSView
{
25 id
<ThrobberDataDelegate
> dataDelegate_
;
28 // Creates a filmstrip view with |frame| and image |image|.
29 + (id
)filmstripThrobberViewWithFrame
:(NSRect
)frame
30 image
:(NSImage
*)image
;
32 // Creates a toast view with |frame| and specified images.
33 + (id
)toastThrobberViewWithFrame
:(NSRect
)frame
34 beforeImage
:(NSImage
*)beforeImage
35 afterImage
:(NSImage
*)afterImage
;
39 #endif // CHROME_BROWSER_UI_COCOA_TABS_THROBBER_VIEW_H_