| 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 #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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 base::Unretained(this))); | 445 base::Unretained(this))); |
| 446 web_ui()->RegisterMessageCallback("offlineLogin", | 446 web_ui()->RegisterMessageCallback("offlineLogin", |
| 447 base::Bind(&SigninScreenHandler::HandleOfflineLogin, | 447 base::Bind(&SigninScreenHandler::HandleOfflineLogin, |
| 448 base::Unretained(this))); | 448 base::Unretained(this))); |
| 449 web_ui()->RegisterMessageCallback("showAddUser", | 449 web_ui()->RegisterMessageCallback("showAddUser", |
| 450 base::Bind(&SigninScreenHandler::HandleShowAddUser, | 450 base::Bind(&SigninScreenHandler::HandleShowAddUser, |
| 451 base::Unretained(this))); | 451 base::Unretained(this))); |
| 452 web_ui()->RegisterMessageCallback("shutdownSystem", | 452 web_ui()->RegisterMessageCallback("shutdownSystem", |
| 453 base::Bind(&SigninScreenHandler::HandleShutdownSystem, | 453 base::Bind(&SigninScreenHandler::HandleShutdownSystem, |
| 454 base::Unretained(this))); | 454 base::Unretained(this))); |
| 455 web_ui()->RegisterMessageCallback("userSelectedDelayed", |
| 456 base::Bind(&SigninScreenHandler::HandleUserSelected, |
| 457 base::Unretained(this))); |
| 455 web_ui()->RegisterMessageCallback("removeUser", | 458 web_ui()->RegisterMessageCallback("removeUser", |
| 456 base::Bind(&SigninScreenHandler::HandleRemoveUser, | 459 base::Bind(&SigninScreenHandler::HandleRemoveUser, |
| 457 base::Unretained(this))); | 460 base::Unretained(this))); |
| 458 web_ui()->RegisterMessageCallback("toggleEnrollmentScreen", | 461 web_ui()->RegisterMessageCallback("toggleEnrollmentScreen", |
| 459 base::Bind(&SigninScreenHandler::HandleToggleEnrollmentScreen, | 462 base::Bind(&SigninScreenHandler::HandleToggleEnrollmentScreen, |
| 460 base::Unretained(this))); | 463 base::Unretained(this))); |
| 461 web_ui()->RegisterMessageCallback("launchHelpApp", | 464 web_ui()->RegisterMessageCallback("launchHelpApp", |
| 462 base::Bind(&SigninScreenHandler::HandleLaunchHelpApp, | 465 base::Bind(&SigninScreenHandler::HandleLaunchHelpApp, |
| 463 base::Unretained(this))); | 466 base::Unretained(this))); |
| 464 web_ui()->RegisterMessageCallback("createAccount", | 467 web_ui()->RegisterMessageCallback("createAccount", |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 | 769 |
| 767 void SigninScreenHandler::HandleShutdownSystem(const base::ListValue* args) { | 770 void SigninScreenHandler::HandleShutdownSystem(const base::ListValue* args) { |
| 768 #if defined(USE_AURA) | 771 #if defined(USE_AURA) |
| 769 // Display the shutdown animation before actually requesting shutdown. | 772 // Display the shutdown animation before actually requesting shutdown. |
| 770 ash::Shell::GetInstance()->power_button_controller()->RequestShutdown(); | 773 ash::Shell::GetInstance()->power_button_controller()->RequestShutdown(); |
| 771 #else | 774 #else |
| 772 DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown(); | 775 DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown(); |
| 773 #endif | 776 #endif |
| 774 } | 777 } |
| 775 | 778 |
| 779 void SigninScreenHandler::HandleUserSelected(const base::ListValue* args) { |
| 780 if (!delegate_) |
| 781 return; |
| 782 |
| 783 std::string email; |
| 784 if (!args->GetString(0, &email)) { |
| 785 NOTREACHED(); |
| 786 return; |
| 787 } |
| 788 |
| 789 delegate_->UserSelected(email); |
| 790 } |
| 791 |
| 776 void SigninScreenHandler::HandleRemoveUser(const base::ListValue* args) { | 792 void SigninScreenHandler::HandleRemoveUser(const base::ListValue* args) { |
| 777 if (!delegate_) | 793 if (!delegate_) |
| 778 return; | 794 return; |
| 779 | 795 |
| 780 std::string email; | 796 std::string email; |
| 781 if (!args->GetString(0, &email)) { | 797 if (!args->GetString(0, &email)) { |
| 782 NOTREACHED(); | 798 NOTREACHED(); |
| 783 return; | 799 return; |
| 784 } | 800 } |
| 785 | 801 |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1032 !dns_clear_task_running_ && | 1048 !dns_clear_task_running_ && |
| 1033 network_state_informer_->is_online()) { | 1049 network_state_informer_->is_online()) { |
| 1034 gaia_silent_load_ = true; | 1050 gaia_silent_load_ = true; |
| 1035 gaia_silent_load_network_ = | 1051 gaia_silent_load_network_ = |
| 1036 network_state_informer_->active_network_service_path(); | 1052 network_state_informer_->active_network_service_path(); |
| 1037 LoadAuthExtension(true, true, false); | 1053 LoadAuthExtension(true, true, false); |
| 1038 } | 1054 } |
| 1039 } | 1055 } |
| 1040 | 1056 |
| 1041 } // namespace chromeos | 1057 } // namespace chromeos |
| OLD | NEW |