Chromium Code Reviews| Index: ash/system/tray/tray_views.h |
| diff --git a/ash/system/tray/tray_views.h b/ash/system/tray/tray_views.h |
| index 4e7588dda1cb85d2a99dd8c31b2ecb8a83417b9a..261c254177b158854d5a3ddb3c82d0df7c5bf090 100644 |
| --- a/ash/system/tray/tray_views.h |
| +++ b/ash/system/tray/tray_views.h |
| @@ -26,6 +26,7 @@ class ImageSkia; |
| namespace views { |
| class Label; |
| +class SmoothedThrobber; |
| } |
| namespace ash { |
| @@ -271,6 +272,34 @@ class TrayBarButtonWithTitle : public views::CustomButton { |
| DISALLOW_COPY_AND_ASSIGN(TrayBarButtonWithTitle); |
| }; |
| +// A throbber with tooltip and animation for starting/stopping. |
| +class ThrobberView : public views::View { |
| + public: |
| + ThrobberView(); |
| + virtual ~ThrobberView(); |
| + |
| + // Overriden from views::View. |
| + virtual gfx::Size GetPreferredSize() OVERRIDE; |
|
sadrul
2013/02/05 02:31:42
Overrides usually go after the non-overrides.
jennyz
2013/02/05 17:37:20
Done.
|
| + virtual void Layout() OVERRIDE; |
| + virtual bool GetTooltipText( |
| + const gfx::Point& p, string16* tooltip) const OVERRIDE; |
| + |
| + void Start(); |
| + void Stop(); |
| + void SetTooltipText(const string16& tooltip_text); |
| + |
| + private: |
| + // Schedules animation for starting/stopping throbber. |
| + void ScheduleAnimation(bool start_throbber); |
| + |
| + views::SmoothedThrobber* throbber_; |
| + |
| + // The current tooltip text. |
| + string16 tooltip_text_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ThrobberView); |
| +}; |
| + |
| // The 'special' looking row in the uber-tray popups. This is usually the bottom |
| // row in the popups, and has a fixed height. |
| class SpecialPopupRow : public views::View { |
| @@ -282,6 +311,7 @@ class SpecialPopupRow : public views::View { |
| void SetContent(views::View* view); |
| void AddButton(TrayPopupHeaderButton* button); |
| + void AddThrobber(ThrobberView* throbber); |
| views::View* content() const { return content_; } |