OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Throbbers display an animation, usually used as a status indicator. | 5 // Throbbers display an animation, usually used as a status indicator. |
6 | 6 |
7 #ifndef VIEWS_CONTROLS_THROBBER_H_ | 7 #ifndef VIEWS_CONTROLS_THROBBER_H_ |
8 #define VIEWS_CONTROLS_THROBBER_H_ | 8 #define VIEWS_CONTROLS_THROBBER_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 }; | 56 }; |
57 | 57 |
58 // A SmoothedThrobber is a throbber that is representing potentially short | 58 // A SmoothedThrobber is a throbber that is representing potentially short |
59 // and nonoverlapping bursts of work. SmoothedThrobber ignores small | 59 // and nonoverlapping bursts of work. SmoothedThrobber ignores small |
60 // pauses in the work stops and starts, and only starts its throbber after | 60 // pauses in the work stops and starts, and only starts its throbber after |
61 // a small amount of work time has passed. | 61 // a small amount of work time has passed. |
62 class SmoothedThrobber : public Throbber { | 62 class SmoothedThrobber : public Throbber { |
63 public: | 63 public: |
64 SmoothedThrobber(int frame_delay_ms); | 64 SmoothedThrobber(int frame_delay_ms); |
65 SmoothedThrobber(int frame_delay_ms, SkBitmap* frames); | 65 SmoothedThrobber(int frame_delay_ms, SkBitmap* frames); |
| 66 virtual ~SmoothedThrobber(); |
66 | 67 |
67 virtual void Start(); | 68 virtual void Start(); |
68 virtual void Stop(); | 69 virtual void Stop(); |
69 | 70 |
70 void set_start_delay_ms(int value) { start_delay_ms_ = value; } | 71 void set_start_delay_ms(int value) { start_delay_ms_ = value; } |
71 void set_stop_delay_ms(int value) { stop_delay_ms_ = value; } | 72 void set_stop_delay_ms(int value) { stop_delay_ms_ = value; } |
72 | 73 |
73 private: | 74 private: |
74 // Called when the startup-delay timer fires | 75 // Called when the startup-delay timer fires |
75 // This function starts the actual throbbing. | 76 // This function starts the actual throbbing. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 118 |
118 // The checkmark image. | 119 // The checkmark image. |
119 static SkBitmap* checkmark_; | 120 static SkBitmap* checkmark_; |
120 | 121 |
121 DISALLOW_COPY_AND_ASSIGN(CheckmarkThrobber); | 122 DISALLOW_COPY_AND_ASSIGN(CheckmarkThrobber); |
122 }; | 123 }; |
123 | 124 |
124 } // namespace views | 125 } // namespace views |
125 | 126 |
126 #endif // VIEWS_CONTROLS_THROBBER_H_ | 127 #endif // VIEWS_CONTROLS_THROBBER_H_ |
OLD | NEW |