Index: chrome/browser/chromeos/login/helper.h |
diff --git a/chrome/browser/chromeos/login/helper.h b/chrome/browser/chromeos/login/helper.h |
index 0ecfe4f94618dca3df2baf629b3b32a794d9474f..2fc5dc608d4a4c59a9cbe6f1adfa97eb4f648918 100644 |
--- a/chrome/browser/chromeos/login/helper.h |
+++ b/chrome/browser/chromeos/login/helper.h |
@@ -8,8 +8,9 @@ |
#define CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_ |
#pragma once |
-#include "views/controls/button/native_button.h" |
#include "third_party/skia/include/core/SkColor.h" |
+#include "views/controls/button/native_button.h" |
+#include "views/widget/widget_gtk.h" |
class GURL; |
@@ -24,10 +25,36 @@ class MenuButton; |
class Painter; |
class Textfield; |
class Throbber; |
+class Widget; |
} // namespace views |
namespace chromeos { |
+// This class manages showing of the throbber in the separete popup widget. |
whywhat
2010/12/09 16:20:18
nit: separete -> separate, showing of -> showing,
altimofeev
2010/12/10 16:37:40
Done.
|
+class ThrobberManager { |
+ public: |
+ ThrobberManager(); |
+ virtual ~ThrobberManager(); |
+ |
+ // Creates throbber above the given host in the right side using the shift |
+ // given. Also places throbber in the middle of the vertical host size. |
+ void StartShow(views::Widget* host, |
whywhat
2010/12/09 16:20:18
Why not just Start?
Also, maybe pass host and thro
altimofeev
2010/12/10 16:37:40
Actually it creates popup and starts the throbber.
|
+ views::Throbber* throbber, |
+ int right_shift); |
whywhat
2010/12/09 16:20:18
Mb right_shift -> right_margin?
altimofeev
2010/12/10 16:37:40
Done.
|
+ |
+ // Creates throbber above the given host using the relative bounds given. |
+ void StartShow(views::Widget* host, |
+ views::Throbber* throbber, |
+ const gfx::Rect relative_bounds); |
whywhat
2010/12/09 16:20:18
const gfx::Rect&?
altimofeev
2010/12/10 16:37:40
Done.
|
+ |
+ // Stops and hides the throbber. Throbber view is no longer valid. |
+ void Stop(); |
+ |
+ private: |
+ // Holds the widget that shows the throbber. |
+ views::Widget* throbber_widget_; |
+}; |
whywhat
2010/12/09 16:20:18
DISABLE_COPY_AND_ASSIGN?
altimofeev
2010/12/10 16:37:40
Done.
|
+ |
// Creates default smoothed throbber for time consuming operations on login. |
views::Throbber* CreateDefaultSmoothedThrobber(); |
@@ -81,6 +108,8 @@ const SkColor kTextColor = SK_ColorWHITE; |
// Default link color on login/OOBE controls. |
const SkColor kLinkColor = 0xFF0066CC; |
+const int kThrobberRightShift = 10; |
+ |
// Default size of the OOBE screen. Includes 10px shadow from each side. |
// See rounded_rect_painter.cc for border definitions. |
const int kWizardScreenWidth = 800; |