| 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/login/managed/locally_managed_user_controller.
h" | 12 #include "chrome/browser/chromeos/login/managed/locally_managed_user_controller.
h" |
| 13 #include "chrome/browser/chromeos/login/wizard_screen.h" | 13 #include "chrome/browser/chromeos/login/wizard_screen.h" |
| 14 #include "chrome/browser/chromeos/net/network_portal_detector.h" |
| 14 #include "chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_s
creen_handler.h" | 15 #include "chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_s
creen_handler.h" |
| 15 | 16 |
| 16 namespace chromeos { | 17 namespace chromeos { |
| 17 | 18 |
| 18 // Class that controls screen showing ui for locally managed user creation. | 19 // Class that controls screen showing ui for locally managed user creation. |
| 19 class LocallyManagedUserCreationScreen | 20 class LocallyManagedUserCreationScreen |
| 20 : public WizardScreen, | 21 : public WizardScreen, |
| 21 public LocallyManagedUserCreationScreenHandler::Delegate, | 22 public LocallyManagedUserCreationScreenHandler::Delegate, |
| 22 public LocallyManagedUserController::StatusConsumer { | 23 public LocallyManagedUserController::StatusConsumer, |
| 24 public NetworkPortalDetector::Observer { |
| 23 public: | 25 public: |
| 24 LocallyManagedUserCreationScreen( | 26 LocallyManagedUserCreationScreen( |
| 25 ScreenObserver* observer, | 27 ScreenObserver* observer, |
| 26 LocallyManagedUserCreationScreenHandler* actor); | 28 LocallyManagedUserCreationScreenHandler* actor); |
| 27 virtual ~LocallyManagedUserCreationScreen(); | 29 virtual ~LocallyManagedUserCreationScreen(); |
| 28 | 30 |
| 29 // Makes screen to show message about inconsistency in manager login flow | 31 // Makes screen to show message about inconsistency in manager login flow |
| 30 // (e.g. password change detected, invalid OAuth token, etc). | 32 // (e.g. password change detected, invalid OAuth token, etc). |
| 31 // Called when manager user is successfully authenticated, so ui elements | 33 // Called when manager user is successfully authenticated, so ui elements |
| 32 // should result in forced logout. | 34 // should result in forced logout. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 61 std::string& manager_password) OVERRIDE; | 63 std::string& manager_password) OVERRIDE; |
| 62 virtual void AbortFlow() OVERRIDE; | 64 virtual void AbortFlow() OVERRIDE; |
| 63 virtual void RetryLastStep() OVERRIDE; | 65 virtual void RetryLastStep() OVERRIDE; |
| 64 virtual void FinishFlow() OVERRIDE; | 66 virtual void FinishFlow() OVERRIDE; |
| 65 | 67 |
| 66 // LocallyManagedUserController::StatusConsumer overrides. | 68 // LocallyManagedUserController::StatusConsumer overrides. |
| 67 virtual void OnCreationError(LocallyManagedUserController::ErrorCode code, | 69 virtual void OnCreationError(LocallyManagedUserController::ErrorCode code, |
| 68 bool recoverable) OVERRIDE; | 70 bool recoverable) OVERRIDE; |
| 69 virtual void OnCreationSuccess() OVERRIDE; | 71 virtual void OnCreationSuccess() OVERRIDE; |
| 70 | 72 |
| 73 // ConnectivityStateHelperObserver implementation: |
| 74 virtual void OnPortalDetectionCompleted( |
| 75 const Network* network, |
| 76 const NetworkPortalDetector::CaptivePortalState& state) OVERRIDE; |
| 71 private: | 77 private: |
| 72 LocallyManagedUserCreationScreenHandler* actor_; | 78 LocallyManagedUserCreationScreenHandler* actor_; |
| 73 | 79 |
| 74 scoped_ptr<LocallyManagedUserController> controller_; | 80 scoped_ptr<LocallyManagedUserController> controller_; |
| 75 | 81 |
| 82 bool on_error_screen_; |
| 83 |
| 76 DISALLOW_COPY_AND_ASSIGN(LocallyManagedUserCreationScreen); | 84 DISALLOW_COPY_AND_ASSIGN(LocallyManagedUserCreationScreen); |
| 77 }; | 85 }; |
| 78 | 86 |
| 79 } // namespace chromeos | 87 } // namespace chromeos |
| 80 | 88 |
| 81 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_CREATION_S
CREEN_H_ | 89 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_CREATION_S
CREEN_H_ |
| 82 | 90 |
| OLD | NEW |