ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / chrome / browser / chromeos / login / supervised / supervised_user_creation_flow.h
blob678a5bba16551495af9c2619a0c954459c1c6553
1 // Copyright 2014 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_SUPERVISED_SUPERVISED_USER_CREATION_FLOW_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_FLOW_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/strings/string16.h"
11 #include "chrome/browser/chromeos/login/user_flow.h"
12 #include "components/user_manager/user.h"
14 class Profile;
16 namespace chromeos {
18 // UserFlow implementation for creating new supervised user.
19 class SupervisedUserCreationFlow : public ExtendedUserFlow {
20 public:
21 explicit SupervisedUserCreationFlow(const std::string& manager_id);
22 ~SupervisedUserCreationFlow() override;
24 bool CanLockScreen() override;
25 bool ShouldShowSettings() override;
26 bool ShouldLaunchBrowser() override;
27 bool ShouldSkipPostLoginScreens() override;
28 bool SupportsEarlyRestartToApplyFlags() override;
29 bool HandleLoginFailure(const AuthFailure& failure) override;
30 void HandleLoginSuccess(const UserContext& context) override;
31 bool HandlePasswordChangeDetected() override;
32 void HandleOAuthTokenStatusChange(
33 user_manager::User::OAuthTokenStatus status) override;
34 void LaunchExtraSteps(Profile* profile) override;
36 private:
37 // Display name for user being created.
38 base::string16 name_;
39 // Password for user being created.
40 std::string password_;
42 // Indicates if manager OAuth2 token has been validated.
43 bool token_validated_;
45 // Indicates if manager was successfully authenticated against
46 // local cryptohome.
47 bool logged_in_;
49 // Indicates that cryptohome is mounted and OAuth2 token is validated.
50 // Used to avoid multiple notifications.
51 bool session_started_;
53 Profile* manager_profile_;
55 DISALLOW_COPY_AND_ASSIGN(SupervisedUserCreationFlow);
58 } // namespace chromeos
60 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_FLOW_H_