OLD | NEW |
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 "views/controls/button/native_button.h" | 11 #include "views/controls/button/native_button.h" |
12 #include "third_party/skia/include/core/SkColor.h" | 12 #include "third_party/skia/include/core/SkColor.h" |
13 | 13 |
14 class GURL; | 14 class GURL; |
15 | 15 |
16 namespace gfx { | 16 namespace gfx { |
17 class Rect; | 17 class Rect; |
18 class Size; | 18 class Size; |
19 } // namespace gfx | 19 } // namespace gfx |
20 | 20 |
21 namespace views { | 21 namespace views { |
22 class Label; | 22 class Label; |
| 23 class MenuButton; |
23 class Painter; | 24 class Painter; |
24 class Textfield; | 25 class Textfield; |
25 class Throbber; | 26 class Throbber; |
26 } // namespace views | 27 } // namespace views |
27 | 28 |
28 namespace chromeos { | 29 namespace chromeos { |
29 | 30 |
30 // Creates default smoothed throbber for time consuming operations on login. | 31 // Creates default smoothed throbber for time consuming operations on login. |
31 views::Throbber* CreateDefaultSmoothedThrobber(); | 32 views::Throbber* CreateDefaultSmoothedThrobber(); |
32 | 33 |
33 // Creates default throbber. | 34 // Creates default throbber. |
34 views::Throbber* CreateDefaultThrobber(); | 35 views::Throbber* CreateDefaultThrobber(); |
35 | 36 |
36 // Creates painter for login background. | 37 // Creates painter for login background. |
37 views::Painter* CreateBackgroundPainter(); | 38 views::Painter* CreateBackgroundPainter(); |
38 | 39 |
39 // Returns bounds of the screen to use for login wizard. | 40 // Returns bounds of the screen to use for login wizard. |
40 // The rect is centered within the default monitor and sized accordingly if | 41 // The rect is centered within the default monitor and sized accordingly if |
41 // |size| is not empty. Otherwise the whole monitor is occupied. | 42 // |size| is not empty. Otherwise the whole monitor is occupied. |
42 gfx::Rect CalculateScreenBounds(const gfx::Size& size); | 43 gfx::Rect CalculateScreenBounds(const gfx::Size& size); |
43 | 44 |
44 // Corrects font size for Label control. | 45 // Corrects font size for Label control. |
45 void CorrectLabelFontSize(views::Label* label); | 46 void CorrectLabelFontSize(views::Label* label); |
46 | 47 |
| 48 // Corrects font size for MenuButton control. |
| 49 void CorrectMenuButtonFontSize(views::MenuButton* button); |
| 50 |
47 // Corrects font size for NativeButton control. | 51 // Corrects font size for NativeButton control. |
48 void CorrectNativeButtonFontSize(views::NativeButton* button); | 52 void CorrectNativeButtonFontSize(views::NativeButton* button); |
49 | 53 |
50 // Corrects font size for Textfield control. | 54 // Corrects font size for Textfield control. |
51 void CorrectTextfieldFontSize(views::Textfield* textfield); | 55 void CorrectTextfieldFontSize(views::Textfield* textfield); |
52 | 56 |
53 // Returns URL used for account recovery. | 57 // Returns URL used for account recovery. |
54 GURL GetAccountRecoveryHelpUrl(); | 58 GURL GetAccountRecoveryHelpUrl(); |
55 | 59 |
56 // Define the constants in |login| namespace to avoid potential | 60 // Define the constants in |login| namespace to avoid potential |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 | 123 |
120 // New pod sizes. | 124 // New pod sizes. |
121 const int kNewUserPodFullWidth = 372; | 125 const int kNewUserPodFullWidth = 372; |
122 const int kNewUserPodFullHeight = 372; | 126 const int kNewUserPodFullHeight = 372; |
123 const int kNewUserPodSmallWidth = 360; | 127 const int kNewUserPodSmallWidth = 360; |
124 const int kNewUserPodSmallHeight = 322; | 128 const int kNewUserPodSmallHeight = 322; |
125 | 129 |
126 } // namespace chromeos | 130 } // namespace chromeos |
127 | 131 |
128 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_ | 132 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_ |
OLD | NEW |