OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
13 #include "chrome/browser/chromeos/login/screen_observer.h" | 13 #include "chrome/browser/chromeos/login/screen_observer.h" |
14 #include "chrome/browser/chromeos/login/view_screen.h" | 14 #include "chrome/browser/chromeos/login/view_screen.h" |
15 #include "chrome/browser/chromeos/login/wizard_screen.h" | 15 #include "chrome/browser/chromeos/login/wizard_screen.h" |
16 #include "testing/gtest/include/gtest/gtest_prod.h" | 16 #include "testing/gtest/include/gtest/gtest_prod.h" |
17 | 17 |
18 class PrefService; | 18 class PrefService; |
19 class WizardContentsView; | 19 class WizardContentsView; |
20 class WizardScreen; | 20 class WizardScreen; |
21 | 21 |
22 namespace chromeos { | 22 namespace chromeos { |
23 class AccountScreen; | 23 class AccountScreen; |
24 class BackgroundView; | 24 class BackgroundView; |
25 class EulaScreen; | 25 class EulaScreen; |
26 class ExistingUserController; | 26 class ExistingUserController; |
| 27 class HTMLPageScreen; |
27 class LoginScreen; | 28 class LoginScreen; |
28 class NetworkScreen; | 29 class NetworkScreen; |
29 class RegistrationScreen; | 30 class RegistrationScreen; |
30 class StartupCustomizationDocument; | 31 class StartupCustomizationDocument; |
31 class UpdateScreen; | 32 class UpdateScreen; |
32 class UserImageScreen; | 33 class UserImageScreen; |
33 } | 34 } |
34 | 35 |
35 namespace gfx { | 36 namespace gfx { |
36 class Rect; | 37 class Rect; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 chromeos::BackgroundView* background_view); | 81 chromeos::BackgroundView* background_view); |
81 | 82 |
82 // Lazy initializers and getters for screens. | 83 // Lazy initializers and getters for screens. |
83 chromeos::NetworkScreen* GetNetworkScreen(); | 84 chromeos::NetworkScreen* GetNetworkScreen(); |
84 chromeos::LoginScreen* GetLoginScreen(); | 85 chromeos::LoginScreen* GetLoginScreen(); |
85 chromeos::AccountScreen* GetAccountScreen(); | 86 chromeos::AccountScreen* GetAccountScreen(); |
86 chromeos::UpdateScreen* GetUpdateScreen(); | 87 chromeos::UpdateScreen* GetUpdateScreen(); |
87 chromeos::UserImageScreen* GetUserImageScreen(); | 88 chromeos::UserImageScreen* GetUserImageScreen(); |
88 chromeos::EulaScreen* GetEulaScreen(); | 89 chromeos::EulaScreen* GetEulaScreen(); |
89 chromeos::RegistrationScreen* GetRegistrationScreen(); | 90 chromeos::RegistrationScreen* GetRegistrationScreen(); |
| 91 chromeos::HTMLPageScreen* GetHTMLPageScreen(); |
90 | 92 |
91 // Show specific screen. | 93 // Show specific screen. |
92 void ShowNetworkScreen(); | 94 void ShowNetworkScreen(); |
93 void ShowAccountScreen(); | 95 void ShowAccountScreen(); |
94 void ShowUpdateScreen(); | 96 void ShowUpdateScreen(); |
95 void ShowUserImageScreen(); | 97 void ShowUserImageScreen(); |
96 void ShowEulaScreen(); | 98 void ShowEulaScreen(); |
97 void ShowRegistrationScreen(); | 99 void ShowRegistrationScreen(); |
| 100 void ShowHTMLPageScreen(); |
98 // Shows the default login screen and returns NULL or shows images login | 101 // Shows the default login screen and returns NULL or shows images login |
99 // screen and returns the corresponding controller instance for optional | 102 // screen and returns the corresponding controller instance for optional |
100 // tweaking. | 103 // tweaking. |
101 chromeos::ExistingUserController* ShowLoginScreen(); | 104 chromeos::ExistingUserController* ShowLoginScreen(); |
102 | 105 |
103 // Returns a pointer to the current screen or NULL if there's no such | 106 // Returns a pointer to the current screen or NULL if there's no such |
104 // screen. | 107 // screen. |
105 WizardScreen* current_screen() const { return current_screen_; } | 108 WizardScreen* current_screen() const { return current_screen_; } |
106 | 109 |
107 // Overrides observer for testing. | 110 // Overrides observer for testing. |
(...skipping 12 matching lines...) Expand all Loading... |
120 | 123 |
121 static const char kNetworkScreenName[]; | 124 static const char kNetworkScreenName[]; |
122 static const char kLoginScreenName[]; | 125 static const char kLoginScreenName[]; |
123 static const char kAccountScreenName[]; | 126 static const char kAccountScreenName[]; |
124 static const char kUpdateScreenName[]; | 127 static const char kUpdateScreenName[]; |
125 static const char kUserImageScreenName[]; | 128 static const char kUserImageScreenName[]; |
126 static const char kRegistrationScreenName[]; | 129 static const char kRegistrationScreenName[]; |
127 static const char kOutOfBoxScreenName[]; | 130 static const char kOutOfBoxScreenName[]; |
128 static const char kTestNoScreenName[]; | 131 static const char kTestNoScreenName[]; |
129 static const char kEulaScreenName[]; | 132 static const char kEulaScreenName[]; |
| 133 static const char kHTMLPageScreenName[]; |
130 | 134 |
131 private: | 135 private: |
132 // Exit handlers: | 136 // Exit handlers: |
133 void OnLoginSignInSelected(); | 137 void OnLoginSignInSelected(); |
134 void OnLoginGuestUser(); | 138 void OnLoginGuestUser(); |
135 void OnLoginCreateAccount(); | 139 void OnLoginCreateAccount(); |
136 void OnNetworkConnected(); | 140 void OnNetworkConnected(); |
137 void OnNetworkOffline(); | 141 void OnNetworkOffline(); |
138 void OnAccountCreateBack(); | 142 void OnAccountCreateBack(); |
139 void OnAccountCreated(); | 143 void OnAccountCreated(); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 views::View* contents_; | 191 views::View* contents_; |
188 | 192 |
189 // Screens. | 193 // Screens. |
190 scoped_ptr<chromeos::NetworkScreen> network_screen_; | 194 scoped_ptr<chromeos::NetworkScreen> network_screen_; |
191 scoped_ptr<chromeos::LoginScreen> login_screen_; | 195 scoped_ptr<chromeos::LoginScreen> login_screen_; |
192 scoped_ptr<chromeos::AccountScreen> account_screen_; | 196 scoped_ptr<chromeos::AccountScreen> account_screen_; |
193 scoped_ptr<chromeos::UpdateScreen> update_screen_; | 197 scoped_ptr<chromeos::UpdateScreen> update_screen_; |
194 scoped_ptr<chromeos::UserImageScreen> user_image_screen_; | 198 scoped_ptr<chromeos::UserImageScreen> user_image_screen_; |
195 scoped_ptr<chromeos::EulaScreen> eula_screen_; | 199 scoped_ptr<chromeos::EulaScreen> eula_screen_; |
196 scoped_ptr<chromeos::RegistrationScreen> registration_screen_; | 200 scoped_ptr<chromeos::RegistrationScreen> registration_screen_; |
| 201 scoped_ptr<chromeos::HTMLPageScreen> html_page_screen_; |
197 | 202 |
198 // Screen that's currently active. | 203 // Screen that's currently active. |
199 WizardScreen* current_screen_; | 204 WizardScreen* current_screen_; |
200 | 205 |
201 std::string username_; | 206 std::string username_; |
202 std::string password_; | 207 std::string password_; |
203 | 208 |
204 // True if running official BUILD. | 209 // True if running official BUILD. |
205 bool is_official_build_; | 210 bool is_official_build_; |
206 | 211 |
(...skipping 20 matching lines...) Expand all Loading... |
227 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, | 232 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, |
228 ControlFlowLanguageOnNetwork); | 233 ControlFlowLanguageOnNetwork); |
229 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, ControlFlowMain); | 234 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, ControlFlowMain); |
230 FRIEND_TEST_ALL_PREFIXES(WizardControllerTest, SwitchLanguage); | 235 FRIEND_TEST_ALL_PREFIXES(WizardControllerTest, SwitchLanguage); |
231 friend class WizardControllerFlowTest; | 236 friend class WizardControllerFlowTest; |
232 | 237 |
233 DISALLOW_COPY_AND_ASSIGN(WizardController); | 238 DISALLOW_COPY_AND_ASSIGN(WizardController); |
234 }; | 239 }; |
235 | 240 |
236 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ | 241 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ |
OLD | NEW |