OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "chrome/browser/chromeos/login/app_launch_signin_screen.h" | 5 #include "chrome/browser/chromeos/login/app_launch_signin_screen.h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "chrome/browser/chromeos/login/help_app_launcher.h" | 8 #include "chrome/browser/chromeos/login/help_app_launcher.h" |
9 #include "chrome/browser/chromeos/login/login_utils.h" | 9 #include "chrome/browser/chromeos/login/login_utils.h" |
10 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h" | |
10 #include "chrome/browser/chromeos/login/users/user.h" | 11 #include "chrome/browser/chromeos/login/users/user.h" |
11 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 12 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
12 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
13 #include "content/public/browser/web_ui.h" | 14 #include "content/public/browser/web_ui.h" |
14 #include "grit/generated_resources.h" | 15 #include "grit/generated_resources.h" |
15 #include "ui/base/l10n/l10n_util.h" | 16 #include "ui/base/l10n/l10n_util.h" |
16 | 17 |
17 namespace chromeos { | 18 namespace chromeos { |
18 | 19 |
19 UserManager* AppLaunchSigninScreen::test_user_manager_ = NULL; | 20 UserManager* AppLaunchSigninScreen::test_user_manager_ = NULL; |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
156 } | 157 } |
157 | 158 |
158 bool AppLaunchSigninScreen::IsShowGuest() const { | 159 bool AppLaunchSigninScreen::IsShowGuest() const { |
159 return false; | 160 return false; |
160 } | 161 } |
161 | 162 |
162 bool AppLaunchSigninScreen::IsShowUsers() const { | 163 bool AppLaunchSigninScreen::IsShowUsers() const { |
163 return true; | 164 return true; |
164 } | 165 } |
165 | 166 |
166 bool AppLaunchSigninScreen::IsShowNewUser() const { | |
167 return false; | |
168 } | |
169 | |
170 bool AppLaunchSigninScreen::IsSigninInProgress() const { | 167 bool AppLaunchSigninScreen::IsSigninInProgress() const { |
171 // Return true to suppress network processing in the signin screen. | 168 // Return true to suppress network processing in the signin screen. |
172 return true; | 169 return true; |
173 } | 170 } |
174 | 171 |
175 bool AppLaunchSigninScreen::IsUserSigninCompleted() const { | 172 bool AppLaunchSigninScreen::IsUserSigninCompleted() const { |
176 return false; | 173 return false; |
177 } | 174 } |
178 | 175 |
179 void AppLaunchSigninScreen::SetDisplayEmail(const std::string& email) { | 176 void AppLaunchSigninScreen::SetDisplayEmail(const std::string& email) { |
(...skipping 16 matching lines...) Expand all Loading... | |
196 0, | 193 0, |
197 l10n_util::GetStringUTF8(IDS_LOGIN_ERROR_AUTHENTICATING_KIOSK), | 194 l10n_util::GetStringUTF8(IDS_LOGIN_ERROR_AUTHENTICATING_KIOSK), |
198 std::string(), | 195 std::string(), |
199 HelpAppLauncher::HELP_CANT_ACCESS_ACCOUNT_OFFLINE); | 196 HelpAppLauncher::HELP_CANT_ACCESS_ACCOUNT_OFFLINE); |
200 } | 197 } |
201 | 198 |
202 void AppLaunchSigninScreen::OnLoginSuccess(const UserContext& user_context) { | 199 void AppLaunchSigninScreen::OnLoginSuccess(const UserContext& user_context) { |
203 delegate_->OnOwnerSigninSuccess(); | 200 delegate_->OnOwnerSigninSuccess(); |
204 } | 201 } |
205 | 202 |
203 void AppLaunchSigninScreen::HandleCustomButtonClicked( | |
204 const std::string& user_id) { | |
205 NOTREACHED(); | |
206 } | |
207 | |
208 void AppLaunchSigninScreen::HandleGetUsers() { | |
209 base::ListValue users_list; | |
Nikita (slow)
2014/05/23 15:52:15
Why this screen should implement this? It should j
Denis Kuznetsov (DE-MUC)
2014/05/27 17:35:28
Because it uses user pods (with just one user).
| |
210 const UserList& users = GetUsers(); | |
211 | |
212 for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) { | |
213 LoginDisplay::AuthType initial_auth_type = | |
214 UserSelectionScreen::ShouldForceOnlineSignIn(*it) | |
215 ? LoginDisplay::ONLINE_SIGN_IN | |
216 : LoginDisplay::OFFLINE_PASSWORD; | |
217 base::DictionaryValue* user_dict = new base::DictionaryValue(); | |
218 UserSelectionScreen::FillUserDictionary( | |
219 *it, true, false, initial_auth_type, user_dict); | |
220 } | |
221 | |
222 webui_handler_->LoadUsers(users_list, false, false); | |
223 } | |
224 | |
206 } // namespace chromeos | 225 } // namespace chromeos |
OLD | NEW |