| 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_USER_FLOW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_FLOW_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_FLOW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_FLOW_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chromeos/login/auth/auth_status_consumer.h" | 10 #include "chromeos/login/auth/auth_status_consumer.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class UserFlow { | 21 class UserFlow { |
| 22 public: | 22 public: |
| 23 UserFlow(); | 23 UserFlow(); |
| 24 virtual ~UserFlow() = 0; | 24 virtual ~UserFlow() = 0; |
| 25 | 25 |
| 26 // Provides ability to alter command line before session has started. | 26 // Provides ability to alter command line before session has started. |
| 27 virtual void AppendAdditionalCommandLineSwitches() = 0; | 27 virtual void AppendAdditionalCommandLineSwitches() = 0; |
| 28 | 28 |
| 29 // Indicates if screen locking should be enabled or disabled for a flow. | 29 // Indicates if screen locking should be enabled or disabled for a flow. |
| 30 virtual bool CanLockScreen() = 0; | 30 virtual bool CanLockScreen() = 0; |
| 31 virtual bool CanStartArc() = 0; |
| 31 virtual bool ShouldShowSettings() = 0; | 32 virtual bool ShouldShowSettings() = 0; |
| 32 virtual bool ShouldShowNotificationTray() = 0; | 33 virtual bool ShouldShowNotificationTray() = 0; |
| 33 virtual bool ShouldLaunchBrowser() = 0; | 34 virtual bool ShouldLaunchBrowser() = 0; |
| 34 virtual bool ShouldSkipPostLoginScreens() = 0; | 35 virtual bool ShouldSkipPostLoginScreens() = 0; |
| 35 virtual bool SupportsEarlyRestartToApplyFlags() = 0; | 36 virtual bool SupportsEarlyRestartToApplyFlags() = 0; |
| 36 virtual bool HandleLoginFailure(const AuthFailure& failure) = 0; | 37 virtual bool HandleLoginFailure(const AuthFailure& failure) = 0; |
| 37 virtual void HandleLoginSuccess(const UserContext& context) = 0; | 38 virtual void HandleLoginSuccess(const UserContext& context) = 0; |
| 38 virtual bool HandlePasswordChangeDetected() = 0; | 39 virtual bool HandlePasswordChangeDetected() = 0; |
| 39 virtual void HandleOAuthTokenStatusChange( | 40 virtual void HandleOAuthTokenStatusChange( |
| 40 user_manager::User::OAuthTokenStatus status) = 0; | 41 user_manager::User::OAuthTokenStatus status) = 0; |
| 41 virtual void LaunchExtraSteps(Profile* profile) = 0; | 42 virtual void LaunchExtraSteps(Profile* profile) = 0; |
| 42 void SetHost(LoginDisplayHost* host); | 43 void SetHost(LoginDisplayHost* host); |
| 43 | 44 |
| 44 LoginDisplayHost* host() { | 45 LoginDisplayHost* host() { |
| 45 return host_; | 46 return host_; |
| 46 } | 47 } |
| 47 | 48 |
| 48 private: | 49 private: |
| 49 LoginDisplayHost* host_; | 50 LoginDisplayHost* host_; |
| 50 }; | 51 }; |
| 51 | 52 |
| 52 // UserFlow implementation for regular login flow. | 53 // UserFlow implementation for regular login flow. |
| 53 class DefaultUserFlow : public UserFlow { | 54 class DefaultUserFlow : public UserFlow { |
| 54 public: | 55 public: |
| 55 ~DefaultUserFlow() override; | 56 ~DefaultUserFlow() override; |
| 56 | 57 |
| 57 void AppendAdditionalCommandLineSwitches() override; | 58 void AppendAdditionalCommandLineSwitches() override; |
| 58 bool CanLockScreen() override; | 59 bool CanLockScreen() override; |
| 60 bool CanStartArc() override; |
| 59 bool ShouldShowSettings() override; | 61 bool ShouldShowSettings() override; |
| 60 bool ShouldShowNotificationTray() override; | 62 bool ShouldShowNotificationTray() override; |
| 61 bool ShouldLaunchBrowser() override; | 63 bool ShouldLaunchBrowser() override; |
| 62 bool ShouldSkipPostLoginScreens() override; | 64 bool ShouldSkipPostLoginScreens() override; |
| 63 bool SupportsEarlyRestartToApplyFlags() override; | 65 bool SupportsEarlyRestartToApplyFlags() override; |
| 64 bool HandleLoginFailure(const AuthFailure& failure) override; | 66 bool HandleLoginFailure(const AuthFailure& failure) override; |
| 65 void HandleLoginSuccess(const UserContext& context) override; | 67 void HandleLoginSuccess(const UserContext& context) override; |
| 66 bool HandlePasswordChangeDetected() override; | 68 bool HandlePasswordChangeDetected() override; |
| 67 void HandleOAuthTokenStatusChange( | 69 void HandleOAuthTokenStatusChange( |
| 68 user_manager::User::OAuthTokenStatus status) override; | 70 user_manager::User::OAuthTokenStatus status) override; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 86 virtual void UnregisterFlowSoon(); | 88 virtual void UnregisterFlowSoon(); |
| 87 const AccountId& account_id() { return account_id_; } | 89 const AccountId& account_id() { return account_id_; } |
| 88 | 90 |
| 89 private: | 91 private: |
| 90 const AccountId account_id_; | 92 const AccountId account_id_; |
| 91 }; | 93 }; |
| 92 | 94 |
| 93 } // namespace chromeos | 95 } // namespace chromeos |
| 94 | 96 |
| 95 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_FLOW_H_ | 97 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_FLOW_H_ |
| OLD | NEW |