OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/ui/webui/chromeos/login/signin_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <vector> | 10 #include <vector> |
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
991 UserContext context(user_manager::USER_TYPE_GUEST, std::string()); | 991 UserContext context(user_manager::USER_TYPE_GUEST, std::string()); |
992 if (delegate_) | 992 if (delegate_) |
993 delegate_->Login(context, SigninSpecifics()); | 993 delegate_->Login(context, SigninSpecifics()); |
994 } | 994 } |
995 | 995 |
996 void SigninScreenHandler::HandleShowSupervisedUserCreationScreen() { | 996 void SigninScreenHandler::HandleShowSupervisedUserCreationScreen() { |
997 if (!user_manager::UserManager::Get()->AreSupervisedUsersAllowed()) { | 997 if (!user_manager::UserManager::Get()->AreSupervisedUsersAllowed()) { |
998 LOG(ERROR) << "Managed users not allowed."; | 998 LOG(ERROR) << "Managed users not allowed."; |
999 return; | 999 return; |
1000 } | 1000 } |
1001 LoginDisplayHostImpl::default_host()-> | 1001 LoginDisplayHost::default_host()->StartWizard( |
1002 StartWizard(WizardController::kSupervisedUserCreationScreenName); | 1002 WizardController::kSupervisedUserCreationScreenName); |
1003 } | 1003 } |
1004 | 1004 |
1005 void SigninScreenHandler::HandleLaunchPublicSession( | 1005 void SigninScreenHandler::HandleLaunchPublicSession( |
1006 const AccountId& account_id, | 1006 const AccountId& account_id, |
1007 const std::string& locale, | 1007 const std::string& locale, |
1008 const std::string& input_method) { | 1008 const std::string& input_method) { |
1009 if (!delegate_) | 1009 if (!delegate_) |
1010 return; | 1010 return; |
1011 | 1011 |
1012 UserContext context(user_manager::USER_TYPE_PUBLIC_ACCOUNT, | 1012 UserContext context(user_manager::USER_TYPE_PUBLIC_ACCOUNT, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1074 | 1074 |
1075 void SigninScreenHandler::HandleToggleEnableDebuggingScreen() { | 1075 void SigninScreenHandler::HandleToggleEnableDebuggingScreen() { |
1076 if (delegate_) | 1076 if (delegate_) |
1077 delegate_->ShowEnableDebuggingScreen(); | 1077 delegate_->ShowEnableDebuggingScreen(); |
1078 } | 1078 } |
1079 | 1079 |
1080 void SigninScreenHandler::HandleToggleKioskEnableScreen() { | 1080 void SigninScreenHandler::HandleToggleKioskEnableScreen() { |
1081 policy::BrowserPolicyConnectorChromeOS* connector = | 1081 policy::BrowserPolicyConnectorChromeOS* connector = |
1082 g_browser_process->platform_part()->browser_policy_connector_chromeos(); | 1082 g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
1083 if (delegate_ && !connector->IsEnterpriseManaged() && | 1083 if (delegate_ && !connector->IsEnterpriseManaged() && |
1084 LoginDisplayHostImpl::default_host()) { | 1084 LoginDisplayHost::default_host()) { |
1085 delegate_->ShowKioskEnableScreen(); | 1085 delegate_->ShowKioskEnableScreen(); |
1086 } | 1086 } |
1087 } | 1087 } |
1088 | 1088 |
1089 void SigninScreenHandler::HandleToggleKioskAutolaunchScreen() { | 1089 void SigninScreenHandler::HandleToggleKioskAutolaunchScreen() { |
1090 policy::BrowserPolicyConnectorChromeOS* connector = | 1090 policy::BrowserPolicyConnectorChromeOS* connector = |
1091 g_browser_process->platform_part()->browser_policy_connector_chromeos(); | 1091 g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
1092 if (delegate_ && !connector->IsEnterpriseManaged()) | 1092 if (delegate_ && !connector->IsEnterpriseManaged()) |
1093 delegate_->ShowKioskAutolaunchScreen(); | 1093 delegate_->ShowKioskAutolaunchScreen(); |
1094 } | 1094 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1135 OnLockBackgroundDisplayed(); | 1135 OnLockBackgroundDisplayed(); |
1136 } | 1136 } |
1137 } | 1137 } |
1138 | 1138 |
1139 void SigninScreenHandler::HandleSignOutUser() { | 1139 void SigninScreenHandler::HandleSignOutUser() { |
1140 if (delegate_) | 1140 if (delegate_) |
1141 delegate_->Signout(); | 1141 delegate_->Signout(); |
1142 } | 1142 } |
1143 | 1143 |
1144 void SigninScreenHandler::HandleOpenProxySettings() { | 1144 void SigninScreenHandler::HandleOpenProxySettings() { |
1145 LoginDisplayHostImpl::default_host()->OpenProxySettings(); | 1145 LoginDisplayHost::default_host()->OpenProxySettings(); |
1146 } | 1146 } |
1147 | 1147 |
1148 void SigninScreenHandler::HandleLoginVisible(const std::string& source) { | 1148 void SigninScreenHandler::HandleLoginVisible(const std::string& source) { |
1149 VLOG(1) << "Login WebUI >> loginVisible, src: " << source << ", " | 1149 VLOG(1) << "Login WebUI >> loginVisible, src: " << source << ", " |
1150 << "webui_visible_: " << webui_visible_; | 1150 << "webui_visible_: " << webui_visible_; |
1151 if (!webui_visible_) { | 1151 if (!webui_visible_) { |
1152 // There might be multiple messages from OOBE UI so send notifications after | 1152 // There might be multiple messages from OOBE UI so send notifications after |
1153 // the first one only. | 1153 // the first one only. |
1154 content::NotificationService::current()->Notify( | 1154 content::NotificationService::current()->Notify( |
1155 chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE, | 1155 chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE, |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1386 return gaia_screen_handler_->frame_error(); | 1386 return gaia_screen_handler_->frame_error(); |
1387 } | 1387 } |
1388 | 1388 |
1389 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { | 1389 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { |
1390 caps_lock_enabled_ = enabled; | 1390 caps_lock_enabled_ = enabled; |
1391 if (page_is_ready()) | 1391 if (page_is_ready()) |
1392 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); | 1392 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); |
1393 } | 1393 } |
1394 | 1394 |
1395 } // namespace chromeos | 1395 } // namespace chromeos |
OLD | NEW |