| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 } | 31 } |
| 32 | 32 |
| 33 namespace chromeos { | 33 namespace chromeos { |
| 34 | 34 |
| 35 // Returns bounds of the screen to use for login wizard. | 35 // Returns bounds of the screen to use for login wizard. |
| 36 // The rect is centered within the default monitor and sized accordingly if | 36 // The rect is centered within the default monitor and sized accordingly if |
| 37 // |size| is not empty. Otherwise the whole monitor is occupied. | 37 // |size| is not empty. Otherwise the whole monitor is occupied. |
| 38 gfx::Rect CalculateScreenBounds(const gfx::Size& size); | 38 gfx::Rect CalculateScreenBounds(const gfx::Size& size); |
| 39 | 39 |
| 40 // Returns the size of user image required for proper display under current DPI. | 40 // Returns the size of user image required for proper display under current DPI. |
| 41 int GetCurrentUserImageSize(); | 41 unsigned int GetCurrentUserImageSize(); |
| 42 | 42 |
| 43 // Define the constants in |login| namespace to avoid potential | 43 // Define the constants in |login| namespace to avoid potential |
| 44 // conflict with other chromeos components. | 44 // conflict with other chromeos components. |
| 45 namespace login { | 45 namespace login { |
| 46 | 46 |
| 47 // Maximum size of user image, in which it should be saved to be properly | 47 // Maximum size of user image, in which it should be saved to be properly |
| 48 // displayed under all possible DPI values. | 48 // displayed under all possible DPI values. |
| 49 const int kMaxUserImageSize = 512; | 49 const int kMaxUserImageSize = 512; |
| 50 | 50 |
| 51 // Returns true if lock/login should scroll user pods into view itself when | 51 // Returns true if lock/login should scroll user pods into view itself when |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 // Returns the request context that contains sign-in cookies. For old iframe | 107 // Returns the request context that contains sign-in cookies. For old iframe |
| 108 // based flow, the context of the sign-in profile is returned. For webview based | 108 // based flow, the context of the sign-in profile is returned. For webview based |
| 109 // flow, the context of the sign-in webview storage partition is returned. | 109 // flow, the context of the sign-in webview storage partition is returned. |
| 110 net::URLRequestContextGetter* GetSigninContext(); | 110 net::URLRequestContextGetter* GetSigninContext(); |
| 111 | 111 |
| 112 } // namespace login | 112 } // namespace login |
| 113 | 113 |
| 114 } // namespace chromeos | 114 } // namespace chromeos |
| 115 | 115 |
| 116 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_ | 116 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_ |
| OLD | NEW |