Update broken references to image assets
[chromium-blink-merge.git] / chrome / browser / chromeos / login / app_launch_signin_screen.h
bloba4a7d87d09ac8869e8da7b53a779527d2f77b8b8
1 // Copyright 2013 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.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_APP_LAUNCH_SIGNIN_SCREEN_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_APP_LAUNCH_SIGNIN_SCREEN_H_
8 #include <string>
10 #include "base/memory/ref_counted.h"
11 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
12 #include "chromeos/login/auth/auth_status_consumer.h"
13 #include "chromeos/login/auth/authenticator.h"
14 #include "components/proximity_auth/screenlock_bridge.h"
15 #include "components/user_manager/user.h"
16 #include "components/user_manager/user_manager.h"
18 namespace chromeos {
20 class OobeUI;
22 // The app launch signin screen shows the user pod of the device owner
23 // and requires the user to login in order to access the network dialog.
24 // This screen is quite similar to the standard lock screen, but we do not
25 // create a new view to superimpose over the desktop.
27 // TODO(tengs): This class doesn't quite follow the idiom of the other
28 // screen classes, as SigninScreenHandler is very tightly coupled with
29 // the login screen. We should do some refactoring in this area.
30 class AppLaunchSigninScreen : public SigninScreenHandlerDelegate,
31 public AuthStatusConsumer {
32 public:
33 class Delegate {
34 public:
35 virtual void OnOwnerSigninSuccess() = 0;
37 protected:
38 virtual ~Delegate() {}
41 AppLaunchSigninScreen(OobeUI* oobe_display, Delegate *delegate);
42 ~AppLaunchSigninScreen() override;
44 void Show();
46 static void SetUserManagerForTesting(user_manager::UserManager* user_manager);
48 private:
49 void InitOwnerUserList();
50 user_manager::UserManager* GetUserManager();
52 // SigninScreenHandlerDelegate implementation:
53 void CancelPasswordChangedFlow() override;
54 void CancelUserAdding() override;
55 void CreateAccount() override;
56 void CompleteLogin(const UserContext& user_context) override;
57 void Login(const UserContext& user_context,
58 const SigninSpecifics& specifics) override;
59 void MigrateUserData(const std::string& old_password) override;
60 void LoadWallpaper(const std::string& username) override;
61 void LoadSigninWallpaper() override;
62 void OnSigninScreenReady() override;
63 void RemoveUser(const std::string& username) override;
64 void ResyncUserData() override;
65 void ShowEnterpriseEnrollmentScreen() override;
66 void ShowEnableDebuggingScreen() override;
67 void ShowKioskEnableScreen() override;
68 void ShowKioskAutolaunchScreen() override;
69 void ShowWrongHWIDScreen() override;
70 void SetWebUIHandler(LoginDisplayWebUIHandler* webui_handler) override;
71 virtual void ShowSigninScreenForCreds(const std::string& username,
72 const std::string& password);
73 const user_manager::UserList& GetUsers() const override;
74 bool IsShowGuest() const override;
75 bool IsShowUsers() const override;
76 bool IsSigninInProgress() const override;
77 bool IsUserSigninCompleted() const override;
78 void SetDisplayEmail(const std::string& email) override;
79 void Signout() override;
80 void HandleGetUsers() override;
81 void CheckUserStatus(const std::string& user_id) override;
82 bool IsUserWhitelisted(const std::string& user_id) override;
84 // AuthStatusConsumer implementation:
85 void OnAuthFailure(const AuthFailure& error) override;
86 void OnAuthSuccess(const UserContext& user_context) override;
88 OobeUI* oobe_ui_;
89 Delegate* delegate_;
90 LoginDisplayWebUIHandler* webui_handler_;
91 scoped_refptr<Authenticator> authenticator_;
93 // This list should have at most one user, and that user should be the owner.
94 user_manager::UserList owner_user_list_;
96 static user_manager::UserManager* test_user_manager_;
98 DISALLOW_COPY_AND_ASSIGN(AppLaunchSigninScreen);
101 } // namespace chromeos
103 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_APP_LAUNCH_SIGNIN_SCREEN_H_