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/wm_message_listener.h" | 31 #include "chrome/browser/chromeos/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 NotificationObserver, | 47 public NotificationObserver, |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
173 | 173 |
174 // Number of login attempts. Used to show help link when > 1 unsuccessful | 174 // Number of login attempts. Used to show help link when > 1 unsuccessful |
175 // logins for the same user. | 175 // logins for the same user. |
176 size_t num_login_attempts_; | 176 size_t num_login_attempts_; |
177 | 177 |
178 // Pointer to the current instance of the controller to be used by | 178 // Pointer to the current instance of the controller to be used by |
179 // automation tests. | 179 // automation tests. |
180 static ExistingUserController* current_controller_; | 180 static ExistingUserController* current_controller_; |
181 | 181 |
182 // Triggers prefetching of user settings. | 182 // Triggers prefetching of user settings. |
183 scoped_ptr<UserCrosSettingsProvider> user_settings_; | 183 CrosSettings* user_settings_; |
Mattias Nissler (ping if slow)
2011/10/13 13:41:06
nit: Comment and variable name are outdated.
pastarmovj
2011/10/26 15:43:19
Done.
| |
184 | 184 |
185 // URL to append to start Guest mode with. | 185 // URL to append to start Guest mode with. |
186 GURL guest_mode_url_; | 186 GURL guest_mode_url_; |
187 | 187 |
188 // Used for user image changed notifications. | 188 // Used for user image changed notifications. |
189 NotificationRegistrar registrar_; | 189 NotificationRegistrar registrar_; |
190 | 190 |
191 // Factory of callbacks. | 191 // Factory of callbacks. |
192 base::WeakPtrFactory<ExistingUserController> weak_factory_; | 192 base::WeakPtrFactory<ExistingUserController> weak_factory_; |
193 | 193 |
(...skipping 10 matching lines...) Expand all Loading... | |
204 bool is_owner_login_; | 204 bool is_owner_login_; |
205 | 205 |
206 FRIEND_TEST_ALL_PREFIXES(ExistingUserControllerTest, NewUserLogin); | 206 FRIEND_TEST_ALL_PREFIXES(ExistingUserControllerTest, NewUserLogin); |
207 | 207 |
208 DISALLOW_COPY_AND_ASSIGN(ExistingUserController); | 208 DISALLOW_COPY_AND_ASSIGN(ExistingUserController); |
209 }; | 209 }; |
210 | 210 |
211 } // namespace chromeos | 211 } // namespace chromeos |
212 | 212 |
213 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ | 213 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ |
OLD | NEW |