OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_SUPERVISED_SUPERVISED_USER_CREATION_SCREEN
_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_SCREEN
_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_SCREEN
_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_SCREEN
_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "chrome/browser/chromeos/camera_presence_notifier.h" | 12 #include "chrome/browser/chromeos/camera_presence_notifier.h" |
13 #include "chrome/browser/chromeos/login/screens/base_screen.h" | 13 #include "chrome/browser/chromeos/login/screens/base_screen.h" |
14 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_cont
roller.h" | 14 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_cont
roller.h" |
15 #include "chrome/browser/image_decoder.h" | 15 #include "chrome/browser/image_decoder.h" |
16 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h" | 16 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h" |
17 #include "chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen
_handler.h" | 17 #include "chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen
_handler.h" |
18 #include "chromeos/network/portal_detector/network_portal_detector.h" | 18 #include "chromeos/network/portal_detector/network_portal_detector.h" |
19 #include "ui/gfx/image/image_skia.h" | 19 #include "ui/gfx/image/image_skia.h" |
20 | 20 |
21 class Profile; | 21 class Profile; |
22 | 22 |
| 23 namespace user_manager { |
| 24 class UserID; |
| 25 } |
| 26 |
23 namespace chromeos { | 27 namespace chromeos { |
24 | 28 |
25 class ErrorScreensHistogramHelper; | 29 class ErrorScreensHistogramHelper; |
26 class NetworkState; | 30 class NetworkState; |
27 class ScreenManager; | 31 class ScreenManager; |
28 | 32 |
29 // Class that controls screen showing ui for supervised user creation. | 33 // Class that controls screen showing ui for supervised user creation. |
30 class SupervisedUserCreationScreen | 34 class SupervisedUserCreationScreen |
31 : public BaseScreen, | 35 : public BaseScreen, |
32 public SupervisedUserCreationScreenHandler::Delegate, | 36 public SupervisedUserCreationScreenHandler::Delegate, |
(...skipping 30 matching lines...) Expand all Loading... |
63 | 67 |
64 // Shows initial screen where managed user name/password are defined and | 68 // Shows initial screen where managed user name/password are defined and |
65 // manager is selected. | 69 // manager is selected. |
66 void ShowInitialScreen(); | 70 void ShowInitialScreen(); |
67 | 71 |
68 // CameraPresenceNotifier::Observer implementation: | 72 // CameraPresenceNotifier::Observer implementation: |
69 void OnCameraPresenceCheckDone(bool is_camera_present) override; | 73 void OnCameraPresenceCheckDone(bool is_camera_present) override; |
70 | 74 |
71 // SupervisedUserSyncServiceObserver implementation | 75 // SupervisedUserSyncServiceObserver implementation |
72 void OnSupervisedUserAcknowledged( | 76 void OnSupervisedUserAcknowledged( |
73 const std::string& supervised_user_id) override {} | 77 const user_manager::UserID& supervised_user_id) override {} |
74 void OnSupervisedUsersSyncingStopped() override {} | 78 void OnSupervisedUsersSyncingStopped() override {} |
75 void OnSupervisedUsersChanged() override; | 79 void OnSupervisedUsersChanged() override; |
76 | 80 |
77 // BaseScreen implementation: | 81 // BaseScreen implementation: |
78 void PrepareToShow() override; | 82 void PrepareToShow() override; |
79 void Show() override; | 83 void Show() override; |
80 void Hide() override; | 84 void Hide() override; |
81 std::string GetName() const override; | 85 std::string GetName() const override; |
82 | 86 |
83 // SupervisedUserCreationScreenHandler::Delegate implementation: | 87 // SupervisedUserCreationScreenHandler::Delegate implementation: |
84 void OnActorDestroyed(SupervisedUserCreationScreenHandler* actor) override; | 88 void OnActorDestroyed(SupervisedUserCreationScreenHandler* actor) override; |
85 void CreateSupervisedUser( | 89 void CreateSupervisedUser( |
86 const base::string16& display_name, | 90 const base::string16& display_name, |
87 const std::string& supervised_user_password) override; | 91 const std::string& supervised_user_password) override; |
88 void ImportSupervisedUser(const std::string& user_id) override; | 92 void ImportSupervisedUser(const user_manager::UserID& user_id) override; |
89 void ImportSupervisedUserWithPassword(const std::string& user_id, | 93 void ImportSupervisedUserWithPassword(const user_manager::UserID& user_id, |
90 const std::string& password) override; | 94 const std::string& password) override; |
91 void AuthenticateManager(const std::string& manager_id, | 95 void AuthenticateManager(const user_manager::UserID& manager_id, |
92 const std::string& manager_password) override; | 96 const std::string& manager_password) override; |
93 void AbortFlow() override; | 97 void AbortFlow() override; |
94 void FinishFlow() override; | 98 void FinishFlow() override; |
95 void HideFlow() override; | 99 void HideFlow() override; |
96 bool FindUserByDisplayName(const base::string16& display_name, | 100 bool FindUserByDisplayName(const base::string16& display_name, |
97 std::string* out_id) const override; | 101 std::string* out_id) const override; |
98 void OnPageSelected(const std::string& page) override; | 102 void OnPageSelected(const std::string& page) override; |
99 | 103 |
100 // SupervisedUserController::StatusConsumer overrides. | 104 // SupervisedUserController::StatusConsumer overrides. |
101 void OnCreationError( | 105 void OnCreationError( |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 148 |
145 base::WeakPtrFactory<SupervisedUserCreationScreen> weak_factory_; | 149 base::WeakPtrFactory<SupervisedUserCreationScreen> weak_factory_; |
146 | 150 |
147 DISALLOW_COPY_AND_ASSIGN(SupervisedUserCreationScreen); | 151 DISALLOW_COPY_AND_ASSIGN(SupervisedUserCreationScreen); |
148 }; | 152 }; |
149 | 153 |
150 } // namespace chromeos | 154 } // namespace chromeos |
151 | 155 |
152 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_SCR
EEN_H_ | 156 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_SCR
EEN_H_ |
153 | 157 |
OLD | NEW |