OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 ASH_SYSTEM_TRAY_THROBBER_VIEW_H_ | 5 #ifndef ASH_SYSTEM_TRAY_THROBBER_VIEW_H_ |
6 #define ASH_SYSTEM_TRAY_THROBBER_VIEW_H_ | 6 #define ASH_SYSTEM_TRAY_THROBBER_VIEW_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "ui/gfx/geometry/size.h" | 9 #include "ui/gfx/geometry/size.h" |
10 #include "ui/views/controls/throbber.h" | 10 #include "ui/views/controls/throbber.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 class ThrobberView : public views::View { | 35 class ThrobberView : public views::View { |
36 public: | 36 public: |
37 ThrobberView(); | 37 ThrobberView(); |
38 ~ThrobberView() override; | 38 ~ThrobberView() override; |
39 | 39 |
40 void Start(); | 40 void Start(); |
41 void Stop(); | 41 void Stop(); |
42 void SetTooltipText(const base::string16& tooltip_text); | 42 void SetTooltipText(const base::string16& tooltip_text); |
43 | 43 |
44 // Overriden from views::View. | 44 // Overriden from views::View. |
45 gfx::Size GetPreferredSize() const override; | 45 gfx::Size CalculatePreferredSize() const override; |
46 void Layout() override; | 46 void Layout() override; |
47 bool GetTooltipText(const gfx::Point& p, | 47 bool GetTooltipText(const gfx::Point& p, |
48 base::string16* tooltip) const override; | 48 base::string16* tooltip) const override; |
49 | 49 |
50 private: | 50 private: |
51 // Schedules animation for starting/stopping throbber. | 51 // Schedules animation for starting/stopping throbber. |
52 void ScheduleAnimation(bool start_throbber); | 52 void ScheduleAnimation(bool start_throbber); |
53 | 53 |
54 SystemTrayThrobber* throbber_; | 54 SystemTrayThrobber* throbber_; |
55 | 55 |
56 // The current tooltip text. | 56 // The current tooltip text. |
57 base::string16 tooltip_text_; | 57 base::string16 tooltip_text_; |
58 | 58 |
59 DISALLOW_COPY_AND_ASSIGN(ThrobberView); | 59 DISALLOW_COPY_AND_ASSIGN(ThrobberView); |
60 }; | 60 }; |
61 | 61 |
62 } // namespace ash | 62 } // namespace ash |
63 | 63 |
64 #endif // ASH_SYSTEM_TRAY_THROBBER_VIEW_H_ | 64 #endif // ASH_SYSTEM_TRAY_THROBBER_VIEW_H_ |
OLD | NEW |