| 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_WIZARD_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 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/time.h" | 14 #include "base/time.h" |
| 15 #include "base/timer.h" | 15 #include "base/timer.h" |
| 16 #include "chrome/browser/chromeos/login/screen_observer.h" | 16 #include "chrome/browser/chromeos/login/screen_observer.h" |
| 17 #include "chrome/browser/chromeos/login/wizard_screen.h" | 17 #include "chrome/browser/chromeos/login/wizard_screen.h" |
| 18 #include "googleurl/src/gurl.h" | 18 #include "googleurl/src/gurl.h" |
| 19 #include "ui/gfx/rect.h" | 19 #include "ui/gfx/rect.h" |
| 20 | 20 |
| 21 class PrefService; | 21 class PrefService; |
| 22 | 22 |
| 23 namespace base { |
| 24 class DictionaryValue; |
| 25 } |
| 26 |
| 23 namespace chromeos { | 27 namespace chromeos { |
| 24 | 28 |
| 25 class EnterpriseEnrollmentScreen; | 29 class EnterpriseEnrollmentScreen; |
| 26 class EulaScreen; | 30 class EulaScreen; |
| 27 class HTMLPageScreen; | 31 class HTMLPageScreen; |
| 28 class LoginDisplayHost; | 32 class LoginDisplayHost; |
| 29 class NetworkScreen; | 33 class NetworkScreen; |
| 30 class OobeDisplay; | 34 class OobeDisplay; |
| 31 class RegistrationScreen; | 35 class RegistrationScreen; |
| 32 class UpdateScreen; | 36 class UpdateScreen; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 75 |
| 72 // Sets initial locale in local settings. | 76 // Sets initial locale in local settings. |
| 73 static void SetInitialLocale(const std::string& locale); | 77 static void SetInitialLocale(const std::string& locale); |
| 74 | 78 |
| 75 // Registers OOBE preferences. | 79 // Registers OOBE preferences. |
| 76 static void RegisterPrefs(PrefService* local_state); | 80 static void RegisterPrefs(PrefService* local_state); |
| 77 | 81 |
| 78 // Shows the first screen defined by |first_screen_name| or by default | 82 // Shows the first screen defined by |first_screen_name| or by default |
| 79 // if the parameter is empty. Takes ownership of |screen_parameters|. | 83 // if the parameter is empty. Takes ownership of |screen_parameters|. |
| 80 void Init(const std::string& first_screen_name, | 84 void Init(const std::string& first_screen_name, |
| 81 DictionaryValue* screen_parameters); | 85 base::DictionaryValue* screen_parameters); |
| 82 | 86 |
| 83 // Advances to screen defined by |screen_name| and shows it. | 87 // Advances to screen defined by |screen_name| and shows it. |
| 84 void AdvanceToScreen(const std::string& screen_name); | 88 void AdvanceToScreen(const std::string& screen_name); |
| 85 | 89 |
| 86 // If being at register screen proceeds to the next one. | 90 // If being at register screen proceeds to the next one. |
| 87 void SkipRegistration(); | 91 void SkipRegistration(); |
| 88 | 92 |
| 89 // Lazy initializers and getters for screens. | 93 // Lazy initializers and getters for screens. |
| 90 NetworkScreen* GetNetworkScreen(); | 94 NetworkScreen* GetNetworkScreen(); |
| 91 UpdateScreen* GetUpdateScreen(); | 95 UpdateScreen* GetUpdateScreen(); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 // Value of the screen name that WizardController was started with. | 198 // Value of the screen name that WizardController was started with. |
| 195 std::string first_screen_name_; | 199 std::string first_screen_name_; |
| 196 | 200 |
| 197 // OOBE/login display host. | 201 // OOBE/login display host. |
| 198 LoginDisplayHost* host_; | 202 LoginDisplayHost* host_; |
| 199 | 203 |
| 200 // Default WizardController. | 204 // Default WizardController. |
| 201 static WizardController* default_controller_; | 205 static WizardController* default_controller_; |
| 202 | 206 |
| 203 // Parameters for the first screen. May be NULL. | 207 // Parameters for the first screen. May be NULL. |
| 204 scoped_ptr<DictionaryValue> screen_parameters_; | 208 scoped_ptr<base::DictionaryValue> screen_parameters_; |
| 205 | 209 |
| 206 base::OneShotTimer<WizardController> smooth_show_timer_; | 210 base::OneShotTimer<WizardController> smooth_show_timer_; |
| 207 | 211 |
| 208 OobeDisplay* oobe_display_; | 212 OobeDisplay* oobe_display_; |
| 209 | 213 |
| 210 // State of Usage stat/error reporting checkbox on EULA screen | 214 // State of Usage stat/error reporting checkbox on EULA screen |
| 211 // during wizard lifetime. | 215 // during wizard lifetime. |
| 212 bool usage_statistics_reporting_; | 216 bool usage_statistics_reporting_; |
| 213 | 217 |
| 214 // Time when the EULA was accepted. Used to measure the duration from the EULA | 218 // Time when the EULA was accepted. Used to measure the duration from the EULA |
| 215 // acceptance until the Sign-In screen is displayed. | 219 // acceptance until the Sign-In screen is displayed. |
| 216 base::Time time_eula_accepted_; | 220 base::Time time_eula_accepted_; |
| 217 | 221 |
| 218 FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentScreenTest, TestCancel); | 222 FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentScreenTest, TestCancel); |
| 219 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, Accelerators); | 223 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, Accelerators); |
| 220 friend class WizardControllerFlowTest; | 224 friend class WizardControllerFlowTest; |
| 221 friend class WizardInProcessBrowserTest; | 225 friend class WizardInProcessBrowserTest; |
| 222 | 226 |
| 223 DISALLOW_COPY_AND_ASSIGN(WizardController); | 227 DISALLOW_COPY_AND_ASSIGN(WizardController); |
| 224 }; | 228 }; |
| 225 | 229 |
| 226 } // namespace chromeos | 230 } // namespace chromeos |
| 227 | 231 |
| 228 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ | 232 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ |
| OLD | NEW |