| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/webui/chromeos/login/signin_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/chromeos/cros/cros_library.h" | 10 #include "chrome/browser/chromeos/cros/cros_library.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 } | 114 } |
| 115 | 115 |
| 116 if (oobe_ui) { | 116 if (oobe_ui) { |
| 117 // Shows new user sign-in for OOBE. | 117 // Shows new user sign-in for OOBE. |
| 118 HandleShowAddUser(NULL); | 118 HandleShowAddUser(NULL); |
| 119 } else { | 119 } else { |
| 120 // Populates account picker. Animation is turned off for now until we | 120 // Populates account picker. Animation is turned off for now until we |
| 121 // figure out how to make it fast enough. | 121 // figure out how to make it fast enough. |
| 122 SendUserList(false); | 122 SendUserList(false); |
| 123 | 123 |
| 124 // Show sign-in UI if there is no visible users. | 124 ShowScreen(kAccountPickerScreen, NULL); |
| 125 if (WebUILoginDisplay::GetInstance()->users().empty()) | |
| 126 HandleShowAddUser(NULL); | |
| 127 else | |
| 128 ShowScreen(kAccountPickerScreen, NULL); | |
| 129 } | 125 } |
| 130 } | 126 } |
| 131 | 127 |
| 132 // SigninScreenHandler, private: ----------------------------------------------- | 128 // SigninScreenHandler, private: ----------------------------------------------- |
| 133 | 129 |
| 134 void SigninScreenHandler::Initialize() { | 130 void SigninScreenHandler::Initialize() { |
| 135 if (show_on_init_) { | 131 if (show_on_init_) { |
| 136 show_on_init_ = false; | 132 show_on_init_ = false; |
| 137 Show(oobe_ui_); | 133 Show(oobe_ui_); |
| 138 } | 134 } |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 base::FundamentalValue animated_value(animated); | 342 base::FundamentalValue animated_value(animated); |
| 347 web_ui_->CallJavascriptFunction("login.AccountPickerScreen.loadUsers", | 343 web_ui_->CallJavascriptFunction("login.AccountPickerScreen.loadUsers", |
| 348 users_list, animated_value); | 344 users_list, animated_value); |
| 349 } | 345 } |
| 350 | 346 |
| 351 void SigninScreenHandler::HandleCreateAccount(const base::ListValue* args) { | 347 void SigninScreenHandler::HandleCreateAccount(const base::ListValue* args) { |
| 352 delegate_->CreateAccount(); | 348 delegate_->CreateAccount(); |
| 353 } | 349 } |
| 354 | 350 |
| 355 } // namespace chromeos | 351 } // namespace chromeos |
| OLD | NEW |