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 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 virtual ~Throbber(); | 30 virtual ~Throbber(); |
31 | 31 |
32 // Start and stop the throbber animation | 32 // Start and stop the throbber animation |
33 virtual void Start(); | 33 virtual void Start(); |
34 virtual void Stop(); | 34 virtual void Stop(); |
35 | 35 |
36 // Set custom throbber frames. Otherwise IDR_THROBBER is loaded. | 36 // Set custom throbber frames. Otherwise IDR_THROBBER is loaded. |
37 void SetFrames(const gfx::ImageSkia* frames); | 37 void SetFrames(const gfx::ImageSkia* frames); |
38 | 38 |
39 // Overridden from View: | 39 // Overridden from View: |
40 virtual gfx::Size GetPreferredSize() OVERRIDE; | 40 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
41 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 41 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
42 | 42 |
43 protected: | 43 protected: |
44 // Specifies whether the throbber is currently animating or not | 44 // Specifies whether the throbber is currently animating or not |
45 bool running_; | 45 bool running_; |
46 | 46 |
47 private: | 47 private: |
48 void Run(); | 48 void Run(); |
49 | 49 |
50 bool paint_while_stopped_; | 50 bool paint_while_stopped_; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 // The checkmark image. | 119 // The checkmark image. |
120 const gfx::ImageSkia* checkmark_; | 120 const gfx::ImageSkia* checkmark_; |
121 | 121 |
122 DISALLOW_COPY_AND_ASSIGN(CheckmarkThrobber); | 122 DISALLOW_COPY_AND_ASSIGN(CheckmarkThrobber); |
123 }; | 123 }; |
124 | 124 |
125 } // namespace views | 125 } // namespace views |
126 | 126 |
127 #endif // UI_VIEWS_CONTROLS_THROBBER_H_ | 127 #endif // UI_VIEWS_CONTROLS_THROBBER_H_ |
OLD | NEW |