| 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..1c3851ac530d26e72d3af91895c80e6e11ea5cd6 100644
|
| --- a/chrome/browser/chromeos/login/helper.h
|
| +++ b/chrome/browser/chromeos/login/helper.h
|
| @@ -8,8 +8,10 @@
|
| #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/view.h"
|
| +#include "views/widget/widget_gtk.h"
|
|
|
| class GURL;
|
|
|
| @@ -22,14 +24,49 @@ namespace views {
|
| class Label;
|
| class MenuButton;
|
| class Painter;
|
| +class SmoothedThrobber;
|
| class Textfield;
|
| class Throbber;
|
| +class Widget;
|
| } // namespace views
|
|
|
| namespace chromeos {
|
|
|
| +// View that provides interface for start/stop throbber above the view.
|
| +class ThrobberHostView : public views::View {
|
| + public:
|
| + ThrobberHostView();
|
| + virtual ~ThrobberHostView();
|
| +
|
| + // Creates throbber above the view in the right side with the default
|
| + // margin. Also places throbber in the middle of the vertical host size.
|
| + // Override |CalculateThrobberBounds| method to change the throbber placing.
|
| + virtual void StartThrobber();
|
| +
|
| + // Stops the throbber.
|
| + virtual void StopThrobber();
|
| +
|
| + protected:
|
| + // Calculates the bounds of the throbber relatively to the host view.
|
| + // Default position is vertically centered right side of the host view.
|
| + virtual gfx::Rect CalculateThrobberBounds(views::Throbber* throbber);
|
| +
|
| + void set_host_view(views::View* host_view) {
|
| + host_view_ = host_view;
|
| + }
|
| +
|
| + private:
|
| + // View to show the throbber above (default is |this|).
|
| + views::View* host_view_;
|
| +
|
| + // Popup that contains the throbber.
|
| + views::Widget* throbber_widget_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ThrobberHostView);
|
| +};
|
| +
|
| // Creates default smoothed throbber for time consuming operations on login.
|
| -views::Throbber* CreateDefaultSmoothedThrobber();
|
| +views::SmoothedThrobber* CreateDefaultSmoothedThrobber();
|
|
|
| // Creates default throbber.
|
| views::Throbber* CreateDefaultThrobber();
|
| @@ -81,6 +118,9 @@ const SkColor kTextColor = SK_ColorWHITE;
|
| // Default link color on login/OOBE controls.
|
| const SkColor kLinkColor = 0xFF0066CC;
|
|
|
| +// Right margin for placing throbber above the view.
|
| +const int kThrobberRightMargin = 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;
|
|
|