Chromium Code Reviews| Index: chrome/browser/ui/cocoa/spinner_progress_indicator.h |
| diff --git a/chrome/browser/ui/cocoa/spinner_progress_indicator.h b/chrome/browser/ui/cocoa/spinner_progress_indicator.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2e9641e7566c43b7ab8be9ab32ae489e0178fc46 |
| --- /dev/null |
| +++ b/chrome/browser/ui/cocoa/spinner_progress_indicator.h |
| @@ -0,0 +1,36 @@ |
| +// 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_nsobject.h" |
|
Nico
2012/10/02 03:47:25
not needed
sail
2012/10/10 02:00:10
Done.
|
| +#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 indeterminate |
| +// 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_ |