OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_MANAGED_LOCALLY_MANAGED_USER_CREATION_SCRE
EN_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_CREATION_SCRE
EN_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_CREATION_SCRE
EN_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_CREATION_SCRE
EN_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/managed/managed_user_creation_controller
.h" | 13 #include "chrome/browser/chromeos/login/managed/managed_user_creation_controller
.h" |
14 #include "chrome/browser/chromeos/login/screens/wizard_screen.h" | 14 #include "chrome/browser/chromeos/login/screens/wizard_screen.h" |
15 #include "chrome/browser/chromeos/net/network_portal_detector.h" | 15 #include "chrome/browser/chromeos/net/network_portal_detector.h" |
16 #include "chrome/browser/image_decoder.h" | 16 #include "chrome/browser/image_decoder.h" |
17 #include "chrome/browser/managed_mode/managed_user_sync_service.h" | 17 #include "chrome/browser/supervised_user/supervised_user_sync_service.h" |
18 #include "chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_s
creen_handler.h" | 18 #include "chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_s
creen_handler.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 chromeos { | 23 namespace chromeos { |
24 | 24 |
25 class NetworkState; | 25 class NetworkState; |
26 | 26 |
27 // Class that controls screen showing ui for locally managed user creation. | 27 // Class that controls screen showing ui for locally managed user creation. |
28 class LocallyManagedUserCreationScreen | 28 class LocallyManagedUserCreationScreen |
29 : public WizardScreen, | 29 : public WizardScreen, |
30 public LocallyManagedUserCreationScreenHandler::Delegate, | 30 public LocallyManagedUserCreationScreenHandler::Delegate, |
31 public ManagedUserCreationController::StatusConsumer, | 31 public ManagedUserCreationController::StatusConsumer, |
32 public ManagedUserSyncServiceObserver, | 32 public SupervisedUserSyncServiceObserver, |
33 public ImageDecoder::Delegate, | 33 public ImageDecoder::Delegate, |
34 public NetworkPortalDetector::Observer, | 34 public NetworkPortalDetector::Observer, |
35 public CameraPresenceNotifier::Observer { | 35 public CameraPresenceNotifier::Observer { |
36 public: | 36 public: |
37 LocallyManagedUserCreationScreen( | 37 LocallyManagedUserCreationScreen( |
38 ScreenObserver* observer, | 38 ScreenObserver* observer, |
39 LocallyManagedUserCreationScreenHandler* actor); | 39 LocallyManagedUserCreationScreenHandler* actor); |
40 virtual ~LocallyManagedUserCreationScreen(); | 40 virtual ~LocallyManagedUserCreationScreen(); |
41 | 41 |
42 // Makes screen to show message about inconsistency in manager login flow | 42 // Makes screen to show message about inconsistency in manager login flow |
(...skipping 15 matching lines...) Expand all Loading... |
58 // Results in spinner indicating that creation is in process. | 58 // Results in spinner indicating that creation is in process. |
59 void OnManagerCryptohomeAuthenticated(); | 59 void OnManagerCryptohomeAuthenticated(); |
60 | 60 |
61 // Shows initial screen where managed user name/password are defined and | 61 // Shows initial screen where managed user name/password are defined and |
62 // manager is selected. | 62 // manager is selected. |
63 void ShowInitialScreen(); | 63 void ShowInitialScreen(); |
64 | 64 |
65 // CameraPresenceNotifier::Observer implementation: | 65 // CameraPresenceNotifier::Observer implementation: |
66 virtual void OnCameraPresenceCheckDone(bool is_camera_present) OVERRIDE; | 66 virtual void OnCameraPresenceCheckDone(bool is_camera_present) OVERRIDE; |
67 | 67 |
68 // ManagedUserSyncServiceObserver implementation | 68 // SupervisedUserSyncServiceObserver implementation |
69 virtual void OnManagedUserAcknowledged( | 69 virtual void OnSupervisedUserAcknowledged( |
70 const std::string& managed_user_id) OVERRIDE {} | 70 const std::string& supervised_user_id) OVERRIDE {} |
71 virtual void OnManagedUsersSyncingStopped() OVERRIDE {} | 71 virtual void OnSupervisedUsersSyncingStopped() OVERRIDE {} |
72 virtual void OnManagedUsersChanged() OVERRIDE; | 72 virtual void OnSupervisedUsersChanged() OVERRIDE; |
73 | 73 |
74 // WizardScreen implementation: | 74 // WizardScreen implementation: |
75 virtual void PrepareToShow() OVERRIDE; | 75 virtual void PrepareToShow() OVERRIDE; |
76 virtual void Show() OVERRIDE; | 76 virtual void Show() OVERRIDE; |
77 virtual void Hide() OVERRIDE; | 77 virtual void Hide() OVERRIDE; |
78 virtual std::string GetName() const OVERRIDE; | 78 virtual std::string GetName() const OVERRIDE; |
79 | 79 |
80 // LocallyManagedUserCreationScreenHandler::Delegate implementation: | 80 // LocallyManagedUserCreationScreenHandler::Delegate implementation: |
81 virtual void OnActorDestroyed(LocallyManagedUserCreationScreenHandler* actor) | 81 virtual void OnActorDestroyed(LocallyManagedUserCreationScreenHandler* actor) |
82 OVERRIDE; | 82 OVERRIDE; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 127 |
128 base::WeakPtrFactory<LocallyManagedUserCreationScreen> weak_factory_; | 128 base::WeakPtrFactory<LocallyManagedUserCreationScreen> weak_factory_; |
129 LocallyManagedUserCreationScreenHandler* actor_; | 129 LocallyManagedUserCreationScreenHandler* actor_; |
130 | 130 |
131 scoped_ptr<ManagedUserCreationController> controller_; | 131 scoped_ptr<ManagedUserCreationController> controller_; |
132 scoped_ptr<base::DictionaryValue> existing_users_; | 132 scoped_ptr<base::DictionaryValue> existing_users_; |
133 | 133 |
134 bool on_error_screen_; | 134 bool on_error_screen_; |
135 std::string last_page_; | 135 std::string last_page_; |
136 | 136 |
137 ManagedUserSyncService* sync_service_; | 137 SupervisedUserSyncService* sync_service_; |
138 | 138 |
139 gfx::ImageSkia user_photo_; | 139 gfx::ImageSkia user_photo_; |
140 scoped_refptr<ImageDecoder> image_decoder_; | 140 scoped_refptr<ImageDecoder> image_decoder_; |
141 bool apply_photo_after_decoding_; | 141 bool apply_photo_after_decoding_; |
142 int selected_image_; | 142 int selected_image_; |
143 | 143 |
144 DISALLOW_COPY_AND_ASSIGN(LocallyManagedUserCreationScreen); | 144 DISALLOW_COPY_AND_ASSIGN(LocallyManagedUserCreationScreen); |
145 }; | 145 }; |
146 | 146 |
147 } // namespace chromeos | 147 } // namespace chromeos |
148 | 148 |
149 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_CREATION_S
CREEN_H_ | 149 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_CREATION_S
CREEN_H_ |
150 | 150 |
OLD | NEW |