OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_ENROLLMENT_ENROLLMENT_SCREEN_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_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 "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "chrome/browser/chromeos/login/enrollment/enrollment_screen_actor.h" | 15 #include "chrome/browser/chromeos/login/enrollment/enrollment_screen_actor.h" |
16 #include "chrome/browser/chromeos/login/screens/wizard_screen.h" | 16 #include "chrome/browser/chromeos/login/screens/base_screen.h" |
17 #include "components/pairing/host_pairing_controller.h" | 17 #include "components/pairing/host_pairing_controller.h" |
18 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 18 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
19 #include "components/policy/core/common/cloud/enterprise_metrics.h" | 19 #include "components/policy/core/common/cloud/enterprise_metrics.h" |
20 | 20 |
21 namespace base { | 21 namespace base { |
22 class ElapsedTimer; | 22 class ElapsedTimer; |
23 } | 23 } |
24 | 24 |
25 namespace pairing_chromeos { | 25 namespace pairing_chromeos { |
26 class ControllerPairingController; | 26 class ControllerPairingController; |
27 } | 27 } |
28 | 28 |
29 namespace chromeos { | 29 namespace chromeos { |
30 | 30 |
31 class ScreenManager; | 31 class ScreenManager; |
32 class ScreenObserver; | 32 class ScreenObserver; |
33 | 33 |
34 // The screen implementation that links the enterprise enrollment UI into the | 34 // The screen implementation that links the enterprise enrollment UI into the |
35 // OOBE wizard. | 35 // OOBE wizard. |
36 class EnrollmentScreen | 36 class EnrollmentScreen |
37 : public WizardScreen, | 37 : public BaseScreen, |
38 public pairing_chromeos::HostPairingController::Observer, | 38 public pairing_chromeos::HostPairingController::Observer, |
39 public EnrollmentScreenActor::Controller { | 39 public EnrollmentScreenActor::Controller { |
40 public: | 40 public: |
41 typedef pairing_chromeos::HostPairingController::Stage Stage; | 41 typedef pairing_chromeos::HostPairingController::Stage Stage; |
42 | 42 |
43 EnrollmentScreen(ScreenObserver* observer, | 43 EnrollmentScreen(ScreenObserver* observer, |
44 EnrollmentScreenActor* actor); | 44 EnrollmentScreenActor* actor); |
45 virtual ~EnrollmentScreen(); | 45 virtual ~EnrollmentScreen(); |
46 | 46 |
47 static EnrollmentScreen* Get(ScreenManager* manager); | 47 static EnrollmentScreen* Get(ScreenManager* manager); |
48 | 48 |
49 // Setup how this screen will handle enrollment. | 49 // Setup how this screen will handle enrollment. |
50 // |shark_controller| is an interface that is used to communicate with a | 50 // |shark_controller| is an interface that is used to communicate with a |
51 // remora device for remote enrollment. | 51 // remora device for remote enrollment. |
52 // |remora_controller| is an interface that is used to communicate with a | 52 // |remora_controller| is an interface that is used to communicate with a |
53 // shark device for remote enrollment. | 53 // shark device for remote enrollment. |
54 void SetParameters( | 54 void SetParameters( |
55 EnrollmentScreenActor::EnrollmentMode enrollment_mode, | 55 EnrollmentScreenActor::EnrollmentMode enrollment_mode, |
56 const std::string& management_domain, | 56 const std::string& management_domain, |
57 const std::string& enrollment_user, | 57 const std::string& enrollment_user, |
58 pairing_chromeos::ControllerPairingController* shark_controller, | 58 pairing_chromeos::ControllerPairingController* shark_controller, |
59 pairing_chromeos::HostPairingController* remora_controller); | 59 pairing_chromeos::HostPairingController* remora_controller); |
60 | 60 |
61 // WizardScreen implementation: | 61 // BaseScreen implementation: |
62 virtual void PrepareToShow() override; | 62 virtual void PrepareToShow() override; |
63 virtual void Show() override; | 63 virtual void Show() override; |
64 virtual void Hide() override; | 64 virtual void Hide() override; |
65 virtual std::string GetName() const override; | 65 virtual std::string GetName() const override; |
66 | 66 |
67 // pairing_chromeos::HostPairingController::Observer: | 67 // pairing_chromeos::HostPairingController::Observer: |
68 virtual void PairingStageChanged(Stage new_stage) override; | 68 virtual void PairingStageChanged(Stage new_stage) override; |
69 virtual void ConfigureHost(bool accepted_eula, | 69 virtual void ConfigureHost(bool accepted_eula, |
70 const std::string& lang, | 70 const std::string& lang, |
71 const std::string& timezone, | 71 const std::string& timezone, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 std::string user_; | 133 std::string user_; |
134 scoped_ptr<base::ElapsedTimer> elapsed_timer_; | 134 scoped_ptr<base::ElapsedTimer> elapsed_timer_; |
135 base::WeakPtrFactory<EnrollmentScreen> weak_ptr_factory_; | 135 base::WeakPtrFactory<EnrollmentScreen> weak_ptr_factory_; |
136 | 136 |
137 DISALLOW_COPY_AND_ASSIGN(EnrollmentScreen); | 137 DISALLOW_COPY_AND_ASSIGN(EnrollmentScreen); |
138 }; | 138 }; |
139 | 139 |
140 } // namespace chromeos | 140 } // namespace chromeos |
141 | 141 |
142 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_H_ | 142 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_H_ |
OLD | NEW |