| 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 CHROME_VIEWS_THROBBER_H__ | 7 #ifndef CHROME_VIEWS_THROBBER_H__ |
| 8 #define CHROME_VIEWS_THROBBER_H__ | 8 #define CHROME_VIEWS_THROBBER_H__ |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 // If |paint_while_stopped| is false, this view will be invisible when not | 22 // If |paint_while_stopped| is false, this view will be invisible when not |
| 23 // running. | 23 // running. |
| 24 Throbber(int frame_time_ms, bool paint_while_stopped); | 24 Throbber(int frame_time_ms, bool paint_while_stopped); |
| 25 virtual ~Throbber(); | 25 virtual ~Throbber(); |
| 26 | 26 |
| 27 // Start and stop the throbber animation | 27 // Start and stop the throbber animation |
| 28 virtual void Start(); | 28 virtual void Start(); |
| 29 virtual void Stop(); | 29 virtual void Stop(); |
| 30 | 30 |
| 31 // overridden from View | 31 // overridden from View |
| 32 virtual void GetPreferredSize(CSize *out); | 32 virtual gfx::Size GetPreferredSize(); |
| 33 virtual void Paint(ChromeCanvas* canvas); | 33 virtual void Paint(ChromeCanvas* canvas); |
| 34 | 34 |
| 35 protected: | 35 protected: |
| 36 // Specifies whether the throbber is currently animating or not | 36 // Specifies whether the throbber is currently animating or not |
| 37 bool running_; | 37 bool running_; |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 void Run(); | 40 void Run(); |
| 41 | 41 |
| 42 bool paint_while_stopped_; | 42 bool paint_while_stopped_; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // The checkmark image. | 104 // The checkmark image. |
| 105 static SkBitmap* checkmark_; | 105 static SkBitmap* checkmark_; |
| 106 | 106 |
| 107 DISALLOW_EVIL_CONSTRUCTORS(CheckmarkThrobber); | 107 DISALLOW_EVIL_CONSTRUCTORS(CheckmarkThrobber); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace ChromeViews | 110 } // namespace ChromeViews |
| 111 | 111 |
| 112 #endif // CHROME_VIEWS_THROBBER_H__ | 112 #endif // CHROME_VIEWS_THROBBER_H__ |
| 113 | 113 |
| OLD | NEW |