1// Copyright (c) 2012 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.
4
5#import <Cocoa/Cocoa.h>
6
7#include "base/time/time.h"
8
9// A class representing the dock icon of the Chromium app. It's its own class
10// since several parts of the app want to manipulate the display of the dock
11// icon.
12//
13// Like all UI, it must only be messaged from the UI thread.
14@interface DockIcon : NSObject {
15 @private
16  // The time that the icon was last updated.
17  base::TimeTicks lastUpdate_;
18
19  // If true, the state has changed in a significant way since the last icon
20  // update and throttling should not prevent icon redraw.
21  BOOL forceUpdate_;
22}
23
24+ (DockIcon*)sharedDockIcon;
25
26// Updates the icon. Use the setters below to set the details first.
27- (void)updateIcon;
28
29// Download progress ///////////////////////////////////////////////////////////
30
31// Indicates how many downloads are in progress.
32- (void)setDownloads:(int)downloads;
33
34// Indicates whether the progress indicator should be in an indeterminate state
35// or not.
36- (void)setIndeterminate:(BOOL)indeterminate;
37
38// Indicates the amount of progress made of the download. Ranges from [0..1].
39- (void)setProgress:(float)progress;
40
41@end
42