Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Side by Side Diff: chrome/browser/chromeos/login/wizard_controller.h

Issue 10096012: [cros] Add Ctrl+Alt+E shortcut to Welcome/EULA screen that cancels update and starts with enrollment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add test Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // if the parameter is empty. Takes ownership of |screen_parameters|. 83 // if the parameter is empty. Takes ownership of |screen_parameters|.
84 void Init(const std::string& first_screen_name, 84 void Init(const std::string& first_screen_name,
85 base::DictionaryValue* screen_parameters); 85 base::DictionaryValue* screen_parameters);
86 86
87 // Advances to screen defined by |screen_name| and shows it. 87 // Advances to screen defined by |screen_name| and shows it.
88 void AdvanceToScreen(const std::string& screen_name); 88 void AdvanceToScreen(const std::string& screen_name);
89 89
90 // If being at register screen proceeds to the next one. 90 // If being at register screen proceeds to the next one.
91 void SkipRegistration(); 91 void SkipRegistration();
92 92
93 // Skip update, go straight to enrollment after EULA is accepted.
94 void SkipUpdateEnrollAfterEula();
95
93 // Lazy initializers and getters for screens. 96 // Lazy initializers and getters for screens.
94 NetworkScreen* GetNetworkScreen(); 97 NetworkScreen* GetNetworkScreen();
95 UpdateScreen* GetUpdateScreen(); 98 UpdateScreen* GetUpdateScreen();
96 UserImageScreen* GetUserImageScreen(); 99 UserImageScreen* GetUserImageScreen();
97 EulaScreen* GetEulaScreen(); 100 EulaScreen* GetEulaScreen();
98 RegistrationScreen* GetRegistrationScreen(); 101 RegistrationScreen* GetRegistrationScreen();
99 HTMLPageScreen* GetHTMLPageScreen(); 102 HTMLPageScreen* GetHTMLPageScreen();
100 EnterpriseEnrollmentScreen* GetEnterpriseEnrollmentScreen(); 103 EnterpriseEnrollmentScreen* GetEnterpriseEnrollmentScreen();
101 104
102 // Returns a pointer to the current screen or NULL if there's no such 105 // Returns a pointer to the current screen or NULL if there's no such
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 void OnUserImageSkipped(); 145 void OnUserImageSkipped();
143 void OnRegistrationSuccess(); 146 void OnRegistrationSuccess();
144 void OnRegistrationSkipped(); 147 void OnRegistrationSkipped();
145 void OnEnterpriseEnrollmentDone(); 148 void OnEnterpriseEnrollmentDone();
146 void OnEnterpriseAutoEnrollmentDone(); 149 void OnEnterpriseAutoEnrollmentDone();
147 void OnOOBECompleted(); 150 void OnOOBECompleted();
148 151
149 // Shows update screen and starts update process. 152 // Shows update screen and starts update process.
150 void InitiateOOBEUpdate(); 153 void InitiateOOBEUpdate();
151 154
155 // Actions that should be done right after EULA is accepted,
156 // before update check.
157 void PerformPostEulaActions();
158
159 // Actions that should be done right after update stage is finished.
160 void PerformPostUpdateActions();
161
152 // Overridden from ScreenObserver: 162 // Overridden from ScreenObserver:
153 virtual void OnExit(ExitCodes exit_code) OVERRIDE; 163 virtual void OnExit(ExitCodes exit_code) OVERRIDE;
154 virtual void ShowCurrentScreen() OVERRIDE; 164 virtual void ShowCurrentScreen() OVERRIDE;
155 virtual void OnSetUserNamePassword(const std::string& username, 165 virtual void OnSetUserNamePassword(const std::string& username,
156 const std::string& password) OVERRIDE; 166 const std::string& password) OVERRIDE;
157 virtual void set_usage_statistics_reporting(bool val) OVERRIDE; 167 virtual void SetUsageStatisticsReporting(bool val) OVERRIDE;
158 virtual bool usage_statistics_reporting() const OVERRIDE; 168 virtual bool GetUsageStatisticsReporting() const OVERRIDE;
159 169
160 // Switches from one screen to another. 170 // Switches from one screen to another.
161 void SetCurrentScreen(WizardScreen* screen); 171 void SetCurrentScreen(WizardScreen* screen);
162 172
163 // Switches from one screen to another with delay before showing. Calling 173 // Switches from one screen to another with delay before showing. Calling
164 // ShowCurrentScreen directly forces screen to be shown immediately. 174 // ShowCurrentScreen directly forces screen to be shown immediately.
165 void SetCurrentScreenSmooth(WizardScreen* screen, bool use_smoothing); 175 void SetCurrentScreenSmooth(WizardScreen* screen, bool use_smoothing);
166 176
167 // Changes status area visibility. 177 // Changes status area visibility.
168 void SetStatusAreaVisible(bool visible); 178 void SetStatusAreaVisible(bool visible);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 scoped_ptr<base::DictionaryValue> screen_parameters_; 218 scoped_ptr<base::DictionaryValue> screen_parameters_;
209 219
210 base::OneShotTimer<WizardController> smooth_show_timer_; 220 base::OneShotTimer<WizardController> smooth_show_timer_;
211 221
212 OobeDisplay* oobe_display_; 222 OobeDisplay* oobe_display_;
213 223
214 // State of Usage stat/error reporting checkbox on EULA screen 224 // State of Usage stat/error reporting checkbox on EULA screen
215 // during wizard lifetime. 225 // during wizard lifetime.
216 bool usage_statistics_reporting_; 226 bool usage_statistics_reporting_;
217 227
228 // If true then update check is cancelled and enrollment is started after
229 // EULA is accepted.
230 bool skip_update_enroll_after_eula_;
231
218 // Time when the EULA was accepted. Used to measure the duration from the EULA 232 // Time when the EULA was accepted. Used to measure the duration from the EULA
219 // acceptance until the Sign-In screen is displayed. 233 // acceptance until the Sign-In screen is displayed.
220 base::Time time_eula_accepted_; 234 base::Time time_eula_accepted_;
221 235
222 FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentScreenTest, TestCancel); 236 FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentScreenTest, TestCancel);
223 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, Accelerators); 237 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, Accelerators);
224 friend class WizardControllerFlowTest; 238 friend class WizardControllerFlowTest;
225 friend class WizardInProcessBrowserTest; 239 friend class WizardInProcessBrowserTest;
226 240
227 DISALLOW_COPY_AND_ASSIGN(WizardController); 241 DISALLOW_COPY_AND_ASSIGN(WizardController);
228 }; 242 };
229 243
230 } // namespace chromeos 244 } // namespace chromeos
231 245
232 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ 246 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/screen_observer.h ('k') | chrome/browser/chromeos/login/wizard_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698