Logo Search packages:      
Sourcecode: chromium-browser version File versions  Download package


// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.


#import <Cocoa/Cocoa.h>

#include "base/scoped_nsobject.h"

@protocol ThrobberDataDelegate;

// A class that knows how to draw an animated state to indicate progress.
// Creating the class starts the animation, destroying it stops it. There are
// two types:
// - Filmstrip: Draws via a sequence of frames in an image. There is no state
//   where the class is frozen on an image and not animating. The image needs to
//   be made of squares such that the height divides evenly into the width.
// - Toast: Draws an image animating down to the bottom and then another image
//   animating up from the bottom. Stops once the animation is complete.

@interface ThrobberView : NSView {
  id<ThrobberDataDelegate> dataDelegate_;
  NSTimer* timer_;  // Animation timer. Weak, owned by runloop.

// Creates a filmstrip view with |frame| and image |image|.
+ (id)filmstripThrobberViewWithFrame:(NSRect)frame

// Creates a toast view with |frame| and specified images.
+ (id)toastThrobberViewWithFrame:(NSRect)frame



Generated by  Doxygen 1.6.0   Back to index