| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "testing/gtest/include/gtest/gtest_prod.h" | 27 #include "testing/gtest/include/gtest/gtest_prod.h" |
| 28 #include "ui/gfx/rect.h" | 28 #include "ui/gfx/rect.h" |
| 29 | 29 |
| 30 #if defined(TOOLKIT_USES_GTK) | 30 #if defined(TOOLKIT_USES_GTK) |
| 31 #include "chrome/browser/chromeos/legacy_window_manager/wm_message_listener.h" | 31 #include "chrome/browser/chromeos/legacy_window_manager/wm_message_listener.h" |
| 32 #endif | 32 #endif |
| 33 | 33 |
| 34 namespace chromeos { | 34 namespace chromeos { |
| 35 | 35 |
| 36 class LoginDisplayHost; | 36 class LoginDisplayHost; |
| 37 class UserCrosSettingsProvider; | 37 class CrosSettings; |
| 38 | 38 |
| 39 // ExistingUserController is used to handle login when someone has | 39 // ExistingUserController is used to handle login when someone has |
| 40 // already logged into the machine. | 40 // already logged into the machine. |
| 41 // To use ExistingUserController create an instance of it and invoke Init. | 41 // To use ExistingUserController create an instance of it and invoke Init. |
| 42 // When Init is called it creates LoginDisplay instance which encapsulates | 42 // When Init is called it creates LoginDisplay instance which encapsulates |
| 43 // all login UI implementation. | 43 // all login UI implementation. |
| 44 // ExistingUserController maintains it's own life cycle and deletes itself when | 44 // ExistingUserController maintains it's own life cycle and deletes itself when |
| 45 // the user logs in (or chooses to see other settings). | 45 // the user logs in (or chooses to see other settings). |
| 46 class ExistingUserController : public LoginDisplay::Delegate, | 46 class ExistingUserController : public LoginDisplay::Delegate, |
| 47 public content::NotificationObserver, | 47 public content::NotificationObserver, |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 scoped_ptr<LoginDisplay> login_display_; | 171 scoped_ptr<LoginDisplay> login_display_; |
| 172 | 172 |
| 173 // Number of login attempts. Used to show help link when > 1 unsuccessful | 173 // Number of login attempts. Used to show help link when > 1 unsuccessful |
| 174 // logins for the same user. | 174 // logins for the same user. |
| 175 size_t num_login_attempts_; | 175 size_t num_login_attempts_; |
| 176 | 176 |
| 177 // Pointer to the current instance of the controller to be used by | 177 // Pointer to the current instance of the controller to be used by |
| 178 // automation tests. | 178 // automation tests. |
| 179 static ExistingUserController* current_controller_; | 179 static ExistingUserController* current_controller_; |
| 180 | 180 |
| 181 // Triggers prefetching of user settings. | 181 // Interface to the signed settings store. |
| 182 scoped_ptr<UserCrosSettingsProvider> user_settings_; | 182 CrosSettings* cros_settings_; |
| 183 | 183 |
| 184 // URL to append to start Guest mode with. | 184 // URL to append to start Guest mode with. |
| 185 GURL guest_mode_url_; | 185 GURL guest_mode_url_; |
| 186 | 186 |
| 187 // Used for user image changed notifications. | 187 // Used for user image changed notifications. |
| 188 content::NotificationRegistrar registrar_; | 188 content::NotificationRegistrar registrar_; |
| 189 | 189 |
| 190 // Factory of callbacks. | 190 // Factory of callbacks. |
| 191 base::WeakPtrFactory<ExistingUserController> weak_factory_; | 191 base::WeakPtrFactory<ExistingUserController> weak_factory_; |
| 192 | 192 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 203 bool is_owner_login_; | 203 bool is_owner_login_; |
| 204 | 204 |
| 205 FRIEND_TEST_ALL_PREFIXES(ExistingUserControllerTest, NewUserLogin); | 205 FRIEND_TEST_ALL_PREFIXES(ExistingUserControllerTest, NewUserLogin); |
| 206 | 206 |
| 207 DISALLOW_COPY_AND_ASSIGN(ExistingUserController); | 207 DISALLOW_COPY_AND_ASSIGN(ExistingUserController); |
| 208 }; | 208 }; |
| 209 | 209 |
| 210 } // namespace chromeos | 210 } // namespace chromeos |
| 211 | 211 |
| 212 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ | 212 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ |
| OLD | NEW |