Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / dock_icon.h
blob259171a001bdaacb13c2382fc6f193790e087c10
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.
5 #import <Cocoa/Cocoa.h>
7 #include "base/time/time.h"
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.
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_;
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_;
24 + (DockIcon*)sharedDockIcon;
26 // Updates the icon. Use the setters below to set the details first.
27 - (void)updateIcon;
29 // Download progress ///////////////////////////////////////////////////////////
31 // Indicates how many downloads are in progress.
32 - (void)setDownloads:(int)downloads;
34 // Indicates whether the progress indicator should be in an indeterminate state
35 // or not.
36 - (void)setIndeterminate:(BOOL)indeterminate;
38 // Indicates the amount of progress made of the download. Ranges from [0..1].
39 - (void)setProgress:(float)progress;
41 @end