| 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> |
| 11 | 11 |
| 12 #include "ash/common/session/session_state_delegate.h" | |
| 13 #include "ash/common/system/chromeos/devicetype_utils.h" | 12 #include "ash/common/system/chromeos/devicetype_utils.h" |
| 14 #include "ash/common/wm_shell.h" | |
| 15 #include "ash/public/interfaces/constants.mojom.h" | 13 #include "ash/public/interfaces/constants.mojom.h" |
| 16 #include "ash/shell.h" | 14 #include "ash/shell.h" |
| 17 #include "ash/wm/lock_state_controller.h" | 15 #include "ash/wm/lock_state_controller.h" |
| 18 #include "base/bind.h" | 16 #include "base/bind.h" |
| 19 #include "base/i18n/number_formatting.h" | 17 #include "base/i18n/number_formatting.h" |
| 20 #include "base/location.h" | 18 #include "base/location.h" |
| 21 #include "base/logging.h" | 19 #include "base/logging.h" |
| 22 #include "base/macros.h" | 20 #include "base/macros.h" |
| 23 #include "base/metrics/histogram_macros.h" | 21 #include "base/metrics/histogram_macros.h" |
| 24 #include "base/single_thread_task_runner.h" | 22 #include "base/single_thread_task_runner.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 #include "chrome/browser/chromeos/login/wizard_controller.h" | 54 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 57 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 55 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 58 #include "chrome/browser/chromeos/policy/device_local_account.h" | 56 #include "chrome/browser/chromeos/policy/device_local_account.h" |
| 59 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 57 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 60 #include "chrome/browser/chromeos/settings/cros_settings.h" | 58 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 61 #include "chrome/browser/chromeos/system/system_clock.h" | 59 #include "chrome/browser/chromeos/system/system_clock.h" |
| 62 #include "chrome/browser/io_thread.h" | 60 #include "chrome/browser/io_thread.h" |
| 63 #include "chrome/browser/profiles/profile.h" | 61 #include "chrome/browser/profiles/profile.h" |
| 64 #include "chrome/browser/profiles/profile_metrics.h" | 62 #include "chrome/browser/profiles/profile_metrics.h" |
| 65 #include "chrome/browser/signin/easy_unlock_service.h" | 63 #include "chrome/browser/signin/easy_unlock_service.h" |
| 64 #include "chrome/browser/ui/ash/session_controller_client.h" |
| 66 #include "chrome/browser/ui/webui/chromeos/login/error_screen_handler.h" | 65 #include "chrome/browser/ui/webui/chromeos/login/error_screen_handler.h" |
| 67 #include "chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h" | 66 #include "chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h" |
| 68 #include "chrome/browser/ui/webui/chromeos/login/l10n_util.h" | 67 #include "chrome/browser/ui/webui/chromeos/login/l10n_util.h" |
| 69 #include "chrome/browser/ui/webui/chromeos/login/native_window_delegate.h" | 68 #include "chrome/browser/ui/webui/chromeos/login/native_window_delegate.h" |
| 70 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" | 69 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" |
| 71 #include "chrome/common/channel_info.h" | 70 #include "chrome/common/channel_info.h" |
| 72 #include "chrome/common/pref_names.h" | 71 #include "chrome/common/pref_names.h" |
| 73 #include "chrome/common/url_constants.h" | 72 #include "chrome/common/url_constants.h" |
| 74 #include "chrome/grit/chromium_strings.h" | 73 #include "chrome/grit/chromium_strings.h" |
| 75 #include "chrome/grit/generated_resources.h" | 74 #include "chrome/grit/generated_resources.h" |
| (...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1436 delegate_->CheckUserStatus(account_id); | 1435 delegate_->CheckUserStatus(account_id); |
| 1437 if (!test_focus_pod_callback_.is_null()) | 1436 if (!test_focus_pod_callback_.is_null()) |
| 1438 test_focus_pod_callback_.Run(); | 1437 test_focus_pod_callback_.Run(); |
| 1439 | 1438 |
| 1440 focused_pod_account_id_ = base::MakeUnique<AccountId>(account_id); | 1439 focused_pod_account_id_ = base::MakeUnique<AccountId>(account_id); |
| 1441 | 1440 |
| 1442 const user_manager::User* user = | 1441 const user_manager::User* user = |
| 1443 user_manager::UserManager::Get()->FindUser(account_id); | 1442 user_manager::UserManager::Get()->FindUser(account_id); |
| 1444 // |user| may be nullptr in kiosk mode or unit tests. | 1443 // |user| may be nullptr in kiosk mode or unit tests. |
| 1445 if (user && user->is_logged_in() && !user->is_active()) { | 1444 if (user && user->is_logged_in() && !user->is_active()) { |
| 1446 ash::WmShell::Get()->GetSessionStateDelegate()->SwitchActiveUser( | 1445 SessionControllerClient::DoSwitchActiveUser(account_id); |
| 1447 account_id); | |
| 1448 } else { | 1446 } else { |
| 1449 SetUserInputMethod(account_id.GetUserEmail(), ime_state_.get()); | 1447 SetUserInputMethod(account_id.GetUserEmail(), ime_state_.get()); |
| 1450 SetKeyboardSettings(account_id); | 1448 SetKeyboardSettings(account_id); |
| 1451 WallpaperManager::Get()->SetUserWallpaperDelayed(account_id); | 1449 WallpaperManager::Get()->SetUserWallpaperDelayed(account_id); |
| 1452 | 1450 |
| 1453 bool use_24hour_clock = false; | 1451 bool use_24hour_clock = false; |
| 1454 if (user_manager::known_user::GetBooleanPref( | 1452 if (user_manager::known_user::GetBooleanPref( |
| 1455 account_id, prefs::kUse24HourClock, &use_24hour_clock)) { | 1453 account_id, prefs::kUse24HourClock, &use_24hour_clock)) { |
| 1456 g_browser_process->platform_part() | 1454 g_browser_process->platform_part() |
| 1457 ->GetSystemClock() | 1455 ->GetSystemClock() |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1645 rate.initial_delay_in_ms = auto_repeat_delay; | 1643 rate.initial_delay_in_ms = auto_repeat_delay; |
| 1646 rate.repeat_interval_in_ms = auto_repeat_interval; | 1644 rate.repeat_interval_in_ms = auto_repeat_interval; |
| 1647 input_method::InputMethodManager::Get() | 1645 input_method::InputMethodManager::Get() |
| 1648 ->GetImeKeyboard() | 1646 ->GetImeKeyboard() |
| 1649 ->SetAutoRepeatEnabled(true); | 1647 ->SetAutoRepeatEnabled(true); |
| 1650 input_method::InputMethodManager::Get()->GetImeKeyboard()->SetAutoRepeatRate( | 1648 input_method::InputMethodManager::Get()->GetImeKeyboard()->SetAutoRepeatRate( |
| 1651 rate); | 1649 rate); |
| 1652 } | 1650 } |
| 1653 | 1651 |
| 1654 } // namespace chromeos | 1652 } // namespace chromeos |
| OLD | NEW |