| Index: chrome/browser/chromeos/login/existing_user_controller.h
|
| diff --git a/chrome/browser/chromeos/login/existing_user_controller.h b/chrome/browser/chromeos/login/existing_user_controller.h
|
| index e1bc66c7a5ec50e8ad8816de9d157a43b8b72a43..437d14231695e0a9be48483fc11d6dbcc70f0568 100644
|
| --- a/chrome/browser/chromeos/login/existing_user_controller.h
|
| +++ b/chrome/browser/chromeos/login/existing_user_controller.h
|
| @@ -18,6 +18,7 @@
|
| #include "base/strings/string16.h"
|
| #include "base/time/time.h"
|
| #include "base/timer/timer.h"
|
| +#include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.h"
|
| #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
|
| #include "chrome/browser/chromeos/login/session/user_session_manager.h"
|
| #include "chrome/browser/chromeos/login/signin/token_handle_util.h"
|
| @@ -55,10 +56,12 @@ class NetworkStateHelper;
|
| // all login UI implementation.
|
| // ExistingUserController maintains it's own life cycle and deletes itself when
|
| // the user logs in (or chooses to see other settings).
|
| -class ExistingUserController : public LoginDisplay::Delegate,
|
| - public content::NotificationObserver,
|
| - public LoginPerformer::Delegate,
|
| - public UserSessionManagerDelegate {
|
| +class ExistingUserController
|
| + : public LoginDisplay::Delegate,
|
| + public content::NotificationObserver,
|
| + public LoginPerformer::Delegate,
|
| + public UserSessionManagerDelegate,
|
| + public ArcKioskAppManager::ArcKioskAppManagerObserver {
|
| public:
|
| // All UI initialization is deferred till Init() call.
|
| explicit ExistingUserController(LoginDisplayHost* host);
|
| @@ -72,11 +75,11 @@ class ExistingUserController : public LoginDisplay::Delegate,
|
| // Creates and shows login UI for known users.
|
| void Init(const user_manager::UserList& users);
|
|
|
| - // Start the public session auto-login timer.
|
| - void StartPublicSessionAutoLoginTimer();
|
| + // Start the auto-login timer.
|
| + void StartAutoLoginTimer();
|
|
|
| - // Stop the public session auto-login timer when a login attempt begins.
|
| - void StopPublicSessionAutoLoginTimer();
|
| + // Stop the auto-login timer when a login attempt begins.
|
| + void StopAutoLoginTimer();
|
|
|
| // LoginDisplay::Delegate: implementation
|
| void CancelPasswordChangedFlow() override;
|
| @@ -87,11 +90,12 @@ class ExistingUserController : public LoginDisplay::Delegate,
|
| const SigninSpecifics& specifics) override;
|
| void MigrateUserData(const std::string& old_password) override;
|
| void OnSigninScreenReady() override;
|
| + void OnGaiaScreenReady() override;
|
| void OnStartEnterpriseEnrollment() override;
|
| void OnStartEnableDebuggingScreen() override;
|
| void OnStartKioskEnableScreen() override;
|
| void OnStartKioskAutolaunchScreen() override;
|
| - void ResetPublicSessionAutoLoginTimer() override;
|
| + void ResetAutoLoginTimer() override;
|
| void ResyncUserData() override;
|
| void SetDisplayEmail(const std::string& email) override;
|
| void ShowWrongHWIDScreen() override;
|
| @@ -103,6 +107,9 @@ class ExistingUserController : public LoginDisplay::Delegate,
|
| const content::NotificationSource& source,
|
| const content::NotificationDetails& details) override;
|
|
|
| + // ArcKioskAppManager::ArcKioskAppManagerObserver overrides.
|
| + void OnArcKioskAppsChanged() override;
|
| +
|
| // Set a delegate that we will pass AuthStatusConsumer events to.
|
| // Used for testing.
|
| void set_login_status_consumer(AuthStatusConsumer* consumer) {
|
| @@ -138,12 +145,14 @@ class ExistingUserController : public LoginDisplay::Delegate,
|
| void LoginAsPublicSession(const UserContext& user_context);
|
| void LoginAsKioskApp(const std::string& app_id, bool diagnostic_mode);
|
| void LoginAsArcKioskApp(const AccountId& account_id);
|
| -
|
| - // Retrieve public session auto-login policy and update the timer.
|
| - void ConfigurePublicSessionAutoLogin();
|
| + // Retrieve public session and ARC kiosk auto-login policy and update the
|
| + // timer.
|
| + void ConfigureAutoLogin();
|
|
|
| // Trigger public session auto-login.
|
| void OnPublicSessionAutoLoginTimerFire();
|
| + // Trigger ARC kiosk auto-login.
|
| + void OnArcKioskAutoLoginTimerFire();
|
|
|
| // LoginPerformer::Delegate implementation:
|
| void OnAuthFailure(const AuthFailure& error) override;
|
| @@ -224,9 +233,9 @@ class ExistingUserController : public LoginDisplay::Delegate,
|
| void PerformPreLoginActions(const UserContext& user_context);
|
|
|
| // Performs set of actions when login has been completed or has been
|
| - // cancelled. If |start_public_session_timer| is true than public session
|
| + // cancelled. If |start_auto_login_timer| is true than
|
| // auto-login timer is started.
|
| - void PerformLoginFinishedActions(bool start_public_session_timer);
|
| + void PerformLoginFinishedActions(bool start_auto_login_timer);
|
|
|
| // Invokes |continuation| after verifying that the device is not disabled.
|
| void ContinueLoginIfDeviceNotDisabled(const base::Closure& continuation);
|
| @@ -255,12 +264,15 @@ class ExistingUserController : public LoginDisplay::Delegate,
|
| // Public session auto-login timer.
|
| std::unique_ptr<base::OneShotTimer> auto_login_timer_;
|
|
|
| - // Public session auto-login timeout, in milliseconds.
|
| - int public_session_auto_login_delay_;
|
| + // Auto-login timeout, in milliseconds.
|
| + int auto_login_delay_;
|
|
|
| // AccountId for public session auto-login.
|
| AccountId public_session_auto_login_account_id_ = EmptyAccountId();
|
|
|
| + // AccountId for ARC kiosk auto-login.
|
| + AccountId arc_kiosk_auto_login_account_id_ = EmptyAccountId();
|
| +
|
| // Used to execute login operations.
|
| std::unique_ptr<LoginPerformer> login_performer_;
|
|
|
| @@ -309,8 +321,9 @@ class ExistingUserController : public LoginDisplay::Delegate,
|
| LoginPerformer::AuthorizationMode auth_mode_ =
|
| LoginPerformer::AUTH_MODE_EXTENSION;
|
|
|
| - // Whether the sign-in UI is finished loading.
|
| - bool signin_screen_ready_ = false;
|
| + // When the sign-in or GAIA UI is finished loading
|
| + // public session or ARC kiosk are ready to auto-launch.
|
| + bool auto_launch_ready_ = false;
|
|
|
| // Indicates use of local (not GAIA) authentication.
|
| bool auth_flow_offline_ = false;
|
|
|