| 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/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" |
| 18 #include "ui/gfx/image/image_skia.h" | 19 #include "ui/gfx/image/image_skia.h" |
| 19 | 20 |
| 20 class Profile; | 21 class Profile; |
| 21 | 22 |
| 22 namespace chromeos { | 23 namespace chromeos { |
| 23 | 24 |
| 24 class NetworkState; | 25 class NetworkState; |
| 25 | 26 |
| 26 // Class that controls screen showing ui for locally managed user creation. | 27 // Class that controls screen showing ui for locally managed user creation. |
| 27 class LocallyManagedUserCreationScreen | 28 class LocallyManagedUserCreationScreen |
| 28 : public WizardScreen, | 29 : public WizardScreen, |
| 29 public LocallyManagedUserCreationScreenHandler::Delegate, | 30 public LocallyManagedUserCreationScreenHandler::Delegate, |
| 30 public ManagedUserCreationController::StatusConsumer, | 31 public ManagedUserCreationController::StatusConsumer, |
| 32 public ManagedUserSyncServiceObserver, |
| 31 public ImageDecoder::Delegate, | 33 public ImageDecoder::Delegate, |
| 32 public NetworkPortalDetector::Observer, | 34 public NetworkPortalDetector::Observer, |
| 33 public CameraPresenceNotifier::Observer { | 35 public CameraPresenceNotifier::Observer { |
| 34 public: | 36 public: |
| 35 LocallyManagedUserCreationScreen( | 37 LocallyManagedUserCreationScreen( |
| 36 ScreenObserver* observer, | 38 ScreenObserver* observer, |
| 37 LocallyManagedUserCreationScreenHandler* actor); | 39 LocallyManagedUserCreationScreenHandler* actor); |
| 38 virtual ~LocallyManagedUserCreationScreen(); | 40 virtual ~LocallyManagedUserCreationScreen(); |
| 39 | 41 |
| 40 // 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... |
| 56 // Results in spinner indicating that creation is in process. | 58 // Results in spinner indicating that creation is in process. |
| 57 void OnManagerCryptohomeAuthenticated(); | 59 void OnManagerCryptohomeAuthenticated(); |
| 58 | 60 |
| 59 // Shows initial screen where managed user name/password are defined and | 61 // Shows initial screen where managed user name/password are defined and |
| 60 // manager is selected. | 62 // manager is selected. |
| 61 void ShowInitialScreen(); | 63 void ShowInitialScreen(); |
| 62 | 64 |
| 63 // CameraPresenceNotifier::Observer implementation: | 65 // CameraPresenceNotifier::Observer implementation: |
| 64 virtual void OnCameraPresenceCheckDone(bool is_camera_present) OVERRIDE; | 66 virtual void OnCameraPresenceCheckDone(bool is_camera_present) OVERRIDE; |
| 65 | 67 |
| 68 // ManagedUserSyncServiceObserver implementation |
| 69 virtual void OnManagedUserAcknowledged( |
| 70 const std::string& managed_user_id) OVERRIDE {} |
| 71 virtual void OnManagedUsersSyncingStopped() OVERRIDE {} |
| 72 virtual void OnManagedUsersChanged() OVERRIDE; |
| 73 |
| 66 // WizardScreen implementation: | 74 // WizardScreen implementation: |
| 67 virtual void PrepareToShow() OVERRIDE; | 75 virtual void PrepareToShow() OVERRIDE; |
| 68 virtual void Show() OVERRIDE; | 76 virtual void Show() OVERRIDE; |
| 69 virtual void Hide() OVERRIDE; | 77 virtual void Hide() OVERRIDE; |
| 70 virtual std::string GetName() const OVERRIDE; | 78 virtual std::string GetName() const OVERRIDE; |
| 71 | 79 |
| 72 // LocallyManagedUserCreationScreenHandler::Delegate implementation: | 80 // LocallyManagedUserCreationScreenHandler::Delegate implementation: |
| 73 virtual void OnActorDestroyed(LocallyManagedUserCreationScreenHandler* actor) | 81 virtual void OnActorDestroyed(LocallyManagedUserCreationScreenHandler* actor) |
| 74 OVERRIDE; | 82 OVERRIDE; |
| 75 virtual void CreateManagedUser( | 83 virtual void CreateManagedUser( |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 127 |
| 120 base::WeakPtrFactory<LocallyManagedUserCreationScreen> weak_factory_; | 128 base::WeakPtrFactory<LocallyManagedUserCreationScreen> weak_factory_; |
| 121 LocallyManagedUserCreationScreenHandler* actor_; | 129 LocallyManagedUserCreationScreenHandler* actor_; |
| 122 | 130 |
| 123 scoped_ptr<ManagedUserCreationController> controller_; | 131 scoped_ptr<ManagedUserCreationController> controller_; |
| 124 scoped_ptr<base::DictionaryValue> existing_users_; | 132 scoped_ptr<base::DictionaryValue> existing_users_; |
| 125 | 133 |
| 126 bool on_error_screen_; | 134 bool on_error_screen_; |
| 127 std::string last_page_; | 135 std::string last_page_; |
| 128 | 136 |
| 137 ManagedUserSyncService* sync_service_; |
| 138 |
| 129 gfx::ImageSkia user_photo_; | 139 gfx::ImageSkia user_photo_; |
| 130 scoped_refptr<ImageDecoder> image_decoder_; | 140 scoped_refptr<ImageDecoder> image_decoder_; |
| 131 bool apply_photo_after_decoding_; | 141 bool apply_photo_after_decoding_; |
| 132 int selected_image_; | 142 int selected_image_; |
| 133 | 143 |
| 134 DISALLOW_COPY_AND_ASSIGN(LocallyManagedUserCreationScreen); | 144 DISALLOW_COPY_AND_ASSIGN(LocallyManagedUserCreationScreen); |
| 135 }; | 145 }; |
| 136 | 146 |
| 137 } // namespace chromeos | 147 } // namespace chromeos |
| 138 | 148 |
| 139 #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_ |
| 140 | 150 |
| OLD | NEW |