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 "third_party/skia/include/core/SkColor.h" | 11 #include "third_party/skia/include/core/SkColor.h" |
12 | 12 |
| 13 class GURL; |
| 14 |
| 15 namespace gfx { |
| 16 class Rect; |
| 17 class Size; |
| 18 } // namespace gfx |
| 19 |
13 namespace views { | 20 namespace views { |
14 class Painter; | 21 class Painter; |
15 class Throbber; | 22 class Throbber; |
16 } // namespace views | 23 } // namespace views |
17 | 24 |
18 namespace chromeos { | 25 namespace chromeos { |
19 | 26 |
20 // Creates default smoothed throbber for time consuming operations on login. | 27 // Creates default smoothed throbber for time consuming operations on login. |
21 views::Throbber* CreateDefaultSmoothedThrobber(); | 28 views::Throbber* CreateDefaultSmoothedThrobber(); |
22 | 29 |
23 // Creates default throbber. | 30 // Creates default throbber. |
24 views::Throbber* CreateDefaultThrobber(); | 31 views::Throbber* CreateDefaultThrobber(); |
25 | 32 |
26 // Creates painter for login background. | 33 // Creates painter for login background. |
27 views::Painter* CreateBackgroundPainter(); | 34 views::Painter* CreateBackgroundPainter(); |
28 | 35 |
29 // Returns bounds of the screen to use for login wizard. | 36 // Returns bounds of the screen to use for login wizard. |
30 // The rect is centered within the default monitor and sized accordingly if | 37 // The rect is centered within the default monitor and sized accordingly if |
31 // |size| is not empty. Otherwise the whole monitor is occupied. | 38 // |size| is not empty. Otherwise the whole monitor is occupied. |
32 gfx::Rect CalculateScreenBounds(const gfx::Size& size); | 39 gfx::Rect CalculateScreenBounds(const gfx::Size& size); |
33 | 40 |
| 41 // Returns URL used for account recovery. |
| 42 GURL GetAccountRecoveryHelpUrl(); |
| 43 |
34 // Define the constants in |login| namespace to avoid potential | 44 // Define the constants in |login| namespace to avoid potential |
35 // conflict with other chromeos components. | 45 // conflict with other chromeos components. |
36 namespace login { | 46 namespace login { |
37 | 47 |
38 // Command tag for buttons on the lock screen. | 48 // Command tag for buttons on the lock screen. |
39 enum Command { | 49 enum Command { |
40 UNLOCK, | 50 UNLOCK, |
41 SIGN_OUT, | 51 SIGN_OUT, |
42 }; | 52 }; |
43 | 53 |
44 // Gap between edge and image view, and image view and controls. | 54 // Gap between edge and image view, and image view and controls. |
45 const int kBorderSize = 4; | 55 const int kBorderSize = 4; |
46 | 56 |
47 // The size of user image. | 57 // The size of user image. |
48 const int kUserImageSize = 256; | 58 const int kUserImageSize = 256; |
49 | 59 |
50 // Background color of the login controls. | 60 // Background color of the login controls. |
51 const SkColor kBackgroundColor = SK_ColorWHITE; | 61 const SkColor kBackgroundColor = SK_ColorWHITE; |
52 | 62 |
53 // Text color on the login controls. | 63 // Text color on the login controls. |
54 const SkColor kTextColor = SK_ColorWHITE; | 64 const SkColor kTextColor = SK_ColorWHITE; |
55 | 65 |
56 } // namespace login | 66 } // namespace login |
57 | 67 |
58 } // namespace chromeos | 68 } // namespace chromeos |
59 | 69 |
60 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_ | 70 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_ |
OLD | NEW |