summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/cocoa/spinner_progress_indicator.h
blob: 373c12b482afd2993ebc9843a388495ede2a37fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright (c) 2012 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.

#ifndef CHROME_BROWSER_UI_COCOA_SPINNER_PROGRESS_INDICATOR_
#define CHROME_BROWSER_UI_COCOA_SPINNER_PROGRESS_INDICATOR_

#import <Cocoa/Cocoa.h>

#include "base/memory/scoped_ptr.h"
#include "base/time.h"

namespace base {
class Timer;
}

// A progress indicator that draws progress as a pie chart. An terminate
// state is represented by simply spinning a slice of the pie around the
// control.
@interface SpinnerProgressIndicator : NSView {
 @private
  scoped_ptr<base::Timer> timer_;
  base::TimeTicks startTime_;
  int percentDone_;
  BOOL isIndeterminate_;
}

@property(nonatomic, assign) int percentDone;
@property(nonatomic, assign) BOOL isIndeterminate;

- (void)sizeToFit;

@end

#endif  // CHROME_BROWSER_UI_COCOA_SPINNER_PROGRESS_INDICATOR_