| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef UI_VIEWS_CONTROLS_THROBBER_H_ | 5 #ifndef UI_VIEWS_CONTROLS_THROBBER_H_ |
| 6 #define UI_VIEWS_CONTROLS_THROBBER_H_ | 6 #define UI_VIEWS_CONTROLS_THROBBER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(Throbber); | 56 DISALLOW_COPY_AND_ASSIGN(Throbber); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 // A SmoothedThrobber is a throbber that is representing potentially short | 59 // A SmoothedThrobber is a throbber that is representing potentially short |
| 60 // and nonoverlapping bursts of work. SmoothedThrobber ignores small | 60 // and nonoverlapping bursts of work. SmoothedThrobber ignores small |
| 61 // pauses in the work stops and starts, and only starts its throbber after | 61 // pauses in the work stops and starts, and only starts its throbber after |
| 62 // a small amount of work time has passed. | 62 // a small amount of work time has passed. |
| 63 class VIEWS_EXPORT SmoothedThrobber : public Throbber { | 63 class VIEWS_EXPORT SmoothedThrobber : public Throbber { |
| 64 public: | 64 public: |
| 65 SmoothedThrobber(int frame_delay_ms); | 65 explicit SmoothedThrobber(int frame_delay_ms); |
| 66 SmoothedThrobber(int frame_delay_ms, SkBitmap* frames); | 66 SmoothedThrobber(int frame_delay_ms, SkBitmap* frames); |
| 67 virtual ~SmoothedThrobber(); | 67 virtual ~SmoothedThrobber(); |
| 68 | 68 |
| 69 virtual void Start() OVERRIDE; | 69 virtual void Start() OVERRIDE; |
| 70 virtual void Stop() OVERRIDE; | 70 virtual void Stop() OVERRIDE; |
| 71 | 71 |
| 72 void set_start_delay_ms(int value) { start_delay_ms_ = value; } | 72 void set_start_delay_ms(int value) { start_delay_ms_ = value; } |
| 73 void set_stop_delay_ms(int value) { stop_delay_ms_ = value; } | 73 void set_stop_delay_ms(int value) { stop_delay_ms_ = value; } |
| 74 | 74 |
| 75 private: | 75 private: |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 117 |
| 118 // The checkmark image. | 118 // The checkmark image. |
| 119 const SkBitmap* checkmark_; | 119 const SkBitmap* checkmark_; |
| 120 | 120 |
| 121 DISALLOW_COPY_AND_ASSIGN(CheckmarkThrobber); | 121 DISALLOW_COPY_AND_ASSIGN(CheckmarkThrobber); |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 } // namespace views | 124 } // namespace views |
| 125 | 125 |
| 126 #endif // UI_VIEWS_CONTROLS_THROBBER_H_ | 126 #endif // UI_VIEWS_CONTROLS_THROBBER_H_ |
| OLD | NEW |