| 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..6db419caaa1650c1a842e7d2b550181e8000b877 100644
|
| --- a/ash/system/tray/tray_views.h
|
| +++ b/ash/system/tray/tray_views.h
|
| @@ -16,6 +16,7 @@
|
| #include "ui/views/controls/image_view.h"
|
| #include "ui/views/controls/scroll_view.h"
|
| #include "ui/views/controls/slider.h"
|
| +#include "ui/views/controls/throbber.h"
|
| #include "ui/views/view.h"
|
|
|
| typedef unsigned int SkColor;
|
| @@ -271,6 +272,53 @@ class TrayBarButtonWithTitle : public views::CustomButton {
|
| DISALLOW_COPY_AND_ASSIGN(TrayBarButtonWithTitle);
|
| };
|
|
|
| +// A SmoothedThrobber with tooltip.
|
| +class SystemTrayThrobber : public views::SmoothedThrobber {
|
| + public:
|
| + SystemTrayThrobber(int frame_delay_ms);
|
| + virtual ~SystemTrayThrobber();
|
| +
|
| + void SetTooltipText(const string16& tooltip_text);
|
| +
|
| + // Overriden from views::View.
|
| + virtual bool GetTooltipText(
|
| + const gfx::Point& p, string16* tooltip) const OVERRIDE;
|
| +
|
| + private:
|
| + // The current tooltip text.
|
| + string16 tooltip_text_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(SystemTrayThrobber);
|
| +};
|
| +
|
| +// A View containing a SystemTrayThrobber with animation for starting/stopping.
|
| +class ThrobberView : public views::View {
|
| + public:
|
| + ThrobberView();
|
| + virtual ~ThrobberView();
|
| +
|
| + void Start();
|
| + void Stop();
|
| + void SetTooltipText(const string16& tooltip_text);
|
| +
|
| + // Overriden from views::View.
|
| + virtual gfx::Size GetPreferredSize() OVERRIDE;
|
| + virtual void Layout() OVERRIDE;
|
| + virtual bool GetTooltipText(
|
| + const gfx::Point& p, string16* tooltip) const OVERRIDE;
|
| +
|
| + private:
|
| + // Schedules animation for starting/stopping throbber.
|
| + void ScheduleAnimation(bool start_throbber);
|
| +
|
| + SystemTrayThrobber* 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 +330,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_; }
|
|
|
|
|