1 // Copyright 2020 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_TPM_ERROR_SCREEN_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_TPM_ERROR_SCREEN_H_
7 
8 #include <string>
9 
10 #include "chrome/browser/chromeos/login/screens/base_screen.h"
11 
12 namespace chromeos {
13 
14 class TpmErrorView;
15 
16 // Controller for the tpm error screen.
17 class TpmErrorScreen : public BaseScreen {
18  public:
19   explicit TpmErrorScreen(TpmErrorView* view);
20   TpmErrorScreen(const TpmErrorScreen&) = delete;
21   TpmErrorScreen& operator=(const TpmErrorScreen&) = delete;
22   ~TpmErrorScreen() override;
23 
24   // Called when the screen is being destroyed. This should call Unbind() on the
25   // associated View if this class is destroyed before that.
26   void OnViewDestroyed(TpmErrorView* view);
27 
28  private:
29   // BaseScreen:
30   void ShowImpl() override;
31   void HideImpl() override;
32   void OnUserAction(const std::string& action_id) override;
33 
34   TpmErrorView* view_ = nullptr;
35 };
36 
37 }  // namespace chromeos
38 
39 #endif  // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_TPM_ERROR_SCREEN_H_
40