Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(609)

Side by Side Diff: chrome/browser/chromeos/login/helper.h

Issue 5709001: Place the spinner in the right corner of the controls window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/chromeos/login
Patch Set: Merged with trunk. Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // This file contains helper functions used by Chromium OS login. 5 // This file contains helper functions used by Chromium OS login.
6 6
7 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_ 7 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_
8 #define CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_ 8 #define CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_
9 #pragma once 9 #pragma once
10 10
11 #include "third_party/skia/include/core/SkColor.h"
11 #include "views/controls/button/native_button.h" 12 #include "views/controls/button/native_button.h"
12 #include "third_party/skia/include/core/SkColor.h" 13 #include "views/widget/widget_gtk.h"
13 14
14 class GURL; 15 class GURL;
15 16
16 namespace gfx { 17 namespace gfx {
17 class Rect; 18 class Rect;
18 class Size; 19 class Size;
19 } // namespace gfx 20 } // namespace gfx
20 21
21 namespace views { 22 namespace views {
22 class Label; 23 class Label;
23 class MenuButton; 24 class MenuButton;
24 class Painter; 25 class Painter;
25 class Textfield; 26 class Textfield;
26 class Throbber; 27 class Throbber;
28 class Widget;
27 } // namespace views 29 } // namespace views
28 30
29 namespace chromeos { 31 namespace chromeos {
30 32
33 // 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.
34 class ThrobberManager {
35 public:
36 ThrobberManager();
37 virtual ~ThrobberManager();
38
39 // Creates throbber above the given host in the right side using the shift
40 // given. Also places throbber in the middle of the vertical host size.
41 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.
42 views::Throbber* throbber,
43 int right_shift);
whywhat 2010/12/09 16:20:18 Mb right_shift -> right_margin?
altimofeev 2010/12/10 16:37:40 Done.
44
45 // Creates throbber above the given host using the relative bounds given.
46 void StartShow(views::Widget* host,
47 views::Throbber* throbber,
48 const gfx::Rect relative_bounds);
whywhat 2010/12/09 16:20:18 const gfx::Rect&?
altimofeev 2010/12/10 16:37:40 Done.
49
50 // Stops and hides the throbber. Throbber view is no longer valid.
51 void Stop();
52
53 private:
54 // Holds the widget that shows the throbber.
55 views::Widget* throbber_widget_;
56 };
whywhat 2010/12/09 16:20:18 DISABLE_COPY_AND_ASSIGN?
altimofeev 2010/12/10 16:37:40 Done.
57
31 // Creates default smoothed throbber for time consuming operations on login. 58 // Creates default smoothed throbber for time consuming operations on login.
32 views::Throbber* CreateDefaultSmoothedThrobber(); 59 views::Throbber* CreateDefaultSmoothedThrobber();
33 60
34 // Creates default throbber. 61 // Creates default throbber.
35 views::Throbber* CreateDefaultThrobber(); 62 views::Throbber* CreateDefaultThrobber();
36 63
37 // Creates painter for login background. 64 // Creates painter for login background.
38 views::Painter* CreateBackgroundPainter(); 65 views::Painter* CreateBackgroundPainter();
39 66
40 // Returns bounds of the screen to use for login wizard. 67 // Returns bounds of the screen to use for login wizard.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 101
75 // Background color of the login controls. 102 // Background color of the login controls.
76 const SkColor kBackgroundColor = SK_ColorWHITE; 103 const SkColor kBackgroundColor = SK_ColorWHITE;
77 104
78 // Text color on the login controls. 105 // Text color on the login controls.
79 const SkColor kTextColor = SK_ColorWHITE; 106 const SkColor kTextColor = SK_ColorWHITE;
80 107
81 // Default link color on login/OOBE controls. 108 // Default link color on login/OOBE controls.
82 const SkColor kLinkColor = 0xFF0066CC; 109 const SkColor kLinkColor = 0xFF0066CC;
83 110
111 const int kThrobberRightShift = 10;
112
84 // Default size of the OOBE screen. Includes 10px shadow from each side. 113 // Default size of the OOBE screen. Includes 10px shadow from each side.
85 // See rounded_rect_painter.cc for border definitions. 114 // See rounded_rect_painter.cc for border definitions.
86 const int kWizardScreenWidth = 800; 115 const int kWizardScreenWidth = 800;
87 const int kWizardScreenHeight = 450; 116 const int kWizardScreenHeight = 450;
88 117
89 const int kScreenCornerRadius = 10; 118 const int kScreenCornerRadius = 10;
90 const int kUserCornerRadius = 6; 119 const int kUserCornerRadius = 6;
91 120
92 // Username label height in different states. 121 // Username label height in different states.
93 const int kSelectedLabelHeight = 25; 122 const int kSelectedLabelHeight = 25;
(...skipping 29 matching lines...) Expand all
123 152
124 // New pod sizes. 153 // New pod sizes.
125 const int kNewUserPodFullWidth = 372; 154 const int kNewUserPodFullWidth = 372;
126 const int kNewUserPodFullHeight = 372; 155 const int kNewUserPodFullHeight = 372;
127 const int kNewUserPodSmallWidth = 360; 156 const int kNewUserPodSmallWidth = 360;
128 const int kNewUserPodSmallHeight = 322; 157 const int kNewUserPodSmallHeight = 322;
129 158
130 } // namespace chromeos 159 } // namespace chromeos
131 160
132 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_ 161 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698