| 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 #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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
| 17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 18 #include "base/timer/timer.h" | 18 #include "base/timer/timer.h" |
| 19 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 19 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
| 20 #include "chrome/browser/chromeos/login/login_display.h" | 20 #include "chrome/browser/chromeos/login/login_display.h" |
| 21 #include "chrome/browser/chromeos/login/login_performer.h" | 21 #include "chrome/browser/chromeos/login/login_performer.h" |
| 22 #include "chrome/browser/chromeos/login/login_utils.h" | 22 #include "chrome/browser/chromeos/login/login_utils.h" |
| 23 #include "chrome/browser/chromeos/login/user.h" | 23 #include "chrome/browser/chromeos/login/user.h" |
| 24 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 24 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 25 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
| 25 #include "content/public/browser/notification_observer.h" | 26 #include "content/public/browser/notification_observer.h" |
| 26 #include "content/public/browser/notification_registrar.h" | 27 #include "content/public/browser/notification_registrar.h" |
| 27 #include "ui/gfx/rect.h" | 28 #include "ui/gfx/rect.h" |
| 28 #include "url/gurl.h" | 29 #include "url/gurl.h" |
| 29 | 30 |
| 30 namespace chromeos { | 31 namespace chromeos { |
| 31 | 32 |
| 32 class CrosSettings; | 33 class CrosSettings; |
| 33 class LoginDisplayHost; | 34 class LoginDisplayHost; |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 virtual void OnOffTheRecordLoginSuccess() OVERRIDE; | 141 virtual void OnOffTheRecordLoginSuccess() OVERRIDE; |
| 141 virtual void OnPasswordChangeDetected() OVERRIDE; | 142 virtual void OnPasswordChangeDetected() OVERRIDE; |
| 142 virtual void WhiteListCheckFailed(const std::string& email) OVERRIDE; | 143 virtual void WhiteListCheckFailed(const std::string& email) OVERRIDE; |
| 143 virtual void PolicyLoadFailed() OVERRIDE; | 144 virtual void PolicyLoadFailed() OVERRIDE; |
| 144 virtual void OnOnlineChecked( | 145 virtual void OnOnlineChecked( |
| 145 const std::string& username, bool success) OVERRIDE; | 146 const std::string& username, bool success) OVERRIDE; |
| 146 | 147 |
| 147 // LoginUtils::Delegate implementation: | 148 // LoginUtils::Delegate implementation: |
| 148 virtual void OnProfilePrepared(Profile* profile) OVERRIDE; | 149 virtual void OnProfilePrepared(Profile* profile) OVERRIDE; |
| 149 | 150 |
| 151 // Called when device settings change. |
| 152 void DeviceSettingsChanged(); |
| 153 |
| 150 // Starts WizardController with the specified screen. | 154 // Starts WizardController with the specified screen. |
| 151 void ActivateWizard(const std::string& screen_name); | 155 void ActivateWizard(const std::string& screen_name); |
| 152 | 156 |
| 153 // Returns corresponding native window. | 157 // Returns corresponding native window. |
| 154 gfx::NativeWindow GetNativeWindow() const; | 158 gfx::NativeWindow GetNativeWindow() const; |
| 155 | 159 |
| 156 // Adds first-time login URLs. | 160 // Adds first-time login URLs. |
| 157 void InitializeStartUrls() const; | 161 void InitializeStartUrls() const; |
| 158 | 162 |
| 159 // Show error message. |error_id| error message ID in resources. | 163 // Show error message. |error_id| error message ID in resources. |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 | 295 |
| 292 // Time when the signin screen was first displayed. Used to measure the time | 296 // Time when the signin screen was first displayed. Used to measure the time |
| 293 // from showing the screen until a successful login is performed. | 297 // from showing the screen until a successful login is performed. |
| 294 base::Time time_init_; | 298 base::Time time_init_; |
| 295 | 299 |
| 296 // Timer for the interval to wait for the reboot after TPM error UI was shown. | 300 // Timer for the interval to wait for the reboot after TPM error UI was shown. |
| 297 base::OneShotTimer<ExistingUserController> reboot_timer_; | 301 base::OneShotTimer<ExistingUserController> reboot_timer_; |
| 298 | 302 |
| 299 scoped_ptr<login::NetworkStateHelper> network_state_helper_; | 303 scoped_ptr<login::NetworkStateHelper> network_state_helper_; |
| 300 | 304 |
| 305 scoped_ptr<CrosSettings::ObserverSubscription> show_user_names_subscription_; |
| 306 scoped_ptr<CrosSettings::ObserverSubscription> allow_new_user_subscription_; |
| 307 scoped_ptr<CrosSettings::ObserverSubscription> allow_guest_subscription_; |
| 308 scoped_ptr<CrosSettings::ObserverSubscription> users_subscription_; |
| 309 scoped_ptr<CrosSettings::ObserverSubscription> |
| 310 local_account_auto_login_id_subscription_; |
| 311 scoped_ptr<CrosSettings::ObserverSubscription> |
| 312 local_account_auto_login_delay_subscription_; |
| 313 |
| 301 FRIEND_TEST_ALL_PREFIXES(ExistingUserControllerTest, ExistingUserLogin); | 314 FRIEND_TEST_ALL_PREFIXES(ExistingUserControllerTest, ExistingUserLogin); |
| 302 | 315 |
| 303 DISALLOW_COPY_AND_ASSIGN(ExistingUserController); | 316 DISALLOW_COPY_AND_ASSIGN(ExistingUserController); |
| 304 }; | 317 }; |
| 305 | 318 |
| 306 } // namespace chromeos | 319 } // namespace chromeos |
| 307 | 320 |
| 308 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ | 321 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ |
| OLD | NEW |