| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_SCREENS_ENCRYPTION_MIGRATION_SCREEN_VIEW_H
_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_ENCRYPTION_MIGRATION_SCREEN_VIEW_H
_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_ENCRYPTION_MIGRATION_SCREEN_VIEW_H
_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_ENCRYPTION_MIGRATION_SCREEN_VIEW_H
_ |
| 7 | 7 |
| 8 #include "chrome/browser/chromeos/login/oobe_screen.h" | 8 #include "chrome/browser/chromeos/login/oobe_screen.h" |
| 9 #include "chromeos/login/auth/login_performer.h" |
| 9 | 10 |
| 10 namespace chromeos { | 11 namespace chromeos { |
| 11 | 12 |
| 12 class UserContext; | 13 class UserContext; |
| 13 | 14 |
| 14 class EncryptionMigrationScreenView { | 15 class EncryptionMigrationScreenView { |
| 15 public: | 16 public: |
| 17 using ContinueLoginCallback = |
| 18 base::OnceCallback<void(const UserContext&, |
| 19 LoginPerformer::AuthorizationMode)>; |
| 20 |
| 16 class Delegate { | 21 class Delegate { |
| 17 public: | 22 public: |
| 18 virtual ~Delegate() {} | 23 virtual ~Delegate() {} |
| 19 | 24 |
| 20 // Called when screen is exited. | 25 // Called when screen is exited. |
| 21 virtual void OnExit() = 0; | 26 virtual void OnExit() = 0; |
| 22 | 27 |
| 23 // This method is called, when view is being destroyed. Note, if Delegate is | 28 // This method is called, when view is being destroyed. Note, if Delegate is |
| 24 // destroyed earlier then it has to call SetDelegate(NULL). | 29 // destroyed earlier then it has to call SetDelegate(NULL). |
| 25 virtual void OnViewDestroyed(EncryptionMigrationScreenView* view) = 0; | 30 virtual void OnViewDestroyed(EncryptionMigrationScreenView* view) = 0; |
| 26 }; | 31 }; |
| 27 | 32 |
| 28 constexpr static OobeScreen kScreenId = | 33 constexpr static OobeScreen kScreenId = |
| 29 OobeScreen::SCREEN_ENCRYPTION_MIGRATION; | 34 OobeScreen::SCREEN_ENCRYPTION_MIGRATION; |
| 30 | 35 |
| 31 virtual ~EncryptionMigrationScreenView() {} | 36 virtual ~EncryptionMigrationScreenView() {} |
| 32 | 37 |
| 33 virtual void Show() = 0; | 38 virtual void Show() = 0; |
| 34 virtual void Hide() = 0; | 39 virtual void Hide() = 0; |
| 35 virtual void SetDelegate(Delegate* delegate) = 0; | 40 virtual void SetDelegate(Delegate* delegate) = 0; |
| 36 virtual void SetUserContext(const UserContext& user_context) = 0; | 41 virtual void SetUserContext(const UserContext& user_context) = 0; |
| 42 virtual void SetContinueLoginCallback(ContinueLoginCallback callback) = 0; |
| 37 }; | 43 }; |
| 38 | 44 |
| 39 } // namespace chromeos | 45 } // namespace chromeos |
| 40 | 46 |
| 41 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_ENCRYPTION_MIGRATION_SCREEN_VIE
W_H_ | 47 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_ENCRYPTION_MIGRATION_SCREEN_VIE
W_H_ |
| OLD | NEW |