| 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> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "third_party/skia/include/core/SkColor.h" | 14 #include "third_party/skia/include/core/SkColor.h" |
| 15 #include "ui/views/view.h" | 15 #include "ui/views/view.h" |
| 16 | 16 |
| 17 class GURL; | 17 class GURL; |
| 18 | 18 |
| 19 namespace gfx { | 19 namespace gfx { |
| 20 class Rect; | 20 class Rect; |
| 21 class Size; | 21 class Size; |
| 22 } // namespace gfx | 22 } // namespace gfx |
| 23 | 23 |
| 24 namespace content { |
| 25 class StoragePartition; |
| 26 } |
| 27 |
| 24 namespace chromeos { | 28 namespace chromeos { |
| 25 | 29 |
| 26 // Returns bounds of the screen to use for login wizard. | 30 // Returns bounds of the screen to use for login wizard. |
| 27 // The rect is centered within the default monitor and sized accordingly if | 31 // The rect is centered within the default monitor and sized accordingly if |
| 28 // |size| is not empty. Otherwise the whole monitor is occupied. | 32 // |size| is not empty. Otherwise the whole monitor is occupied. |
| 29 gfx::Rect CalculateScreenBounds(const gfx::Size& size); | 33 gfx::Rect CalculateScreenBounds(const gfx::Size& size); |
| 30 | 34 |
| 31 // Returns the size of user image required for proper display under current DPI. | 35 // Returns the size of user image required for proper display under current DPI. |
| 32 int GetCurrentUserImageSize(); | 36 int GetCurrentUserImageSize(); |
| 33 | 37 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 59 // Returns true if the default network is in connected state. | 63 // Returns true if the default network is in connected state. |
| 60 virtual bool IsConnected() const; | 64 virtual bool IsConnected() const; |
| 61 | 65 |
| 62 // Returns true if the default network is in connecting state. | 66 // Returns true if the default network is in connecting state. |
| 63 virtual bool IsConnecting() const; | 67 virtual bool IsConnecting() const; |
| 64 | 68 |
| 65 private: | 69 private: |
| 66 DISALLOW_COPY_AND_ASSIGN(NetworkStateHelper); | 70 DISALLOW_COPY_AND_ASSIGN(NetworkStateHelper); |
| 67 }; | 71 }; |
| 68 | 72 |
| 73 // |
| 74 // Webview based login helpers. |
| 75 // |
| 76 |
| 77 // Returns the storage partition for the sign-in webview. |
| 78 content::StoragePartition* GetSigninPartition(); |
| 79 |
| 69 } // namespace login | 80 } // namespace login |
| 70 | 81 |
| 71 } // namespace chromeos | 82 } // namespace chromeos |
| 72 | 83 |
| 73 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_ | 84 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_ |
| OLD | NEW |