| 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/chromeos/login/login_display_host_impl.h" | 5 #include "chrome/browser/chromeos/login/login_display_host_impl.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/audio/sounds.h" | 9 #include "ash/audio/sounds.h" |
| 10 #include "ash/desktop_background/desktop_background_controller.h" | 10 #include "ash/desktop_background/desktop_background_controller.h" |
| (...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 manager->SetInputMethodLoginDefault(); | 1047 manager->SetInputMethodLoginDefault(); |
| 1048 | 1048 |
| 1049 PrefService* prefs = g_browser_process->local_state(); | 1049 PrefService* prefs = g_browser_process->local_state(); |
| 1050 // Apply owner preferences for tap-to-click and mouse buttons swap for | 1050 // Apply owner preferences for tap-to-click and mouse buttons swap for |
| 1051 // login screen. | 1051 // login screen. |
| 1052 system::InputDeviceSettings::Get()->SetPrimaryButtonRight( | 1052 system::InputDeviceSettings::Get()->SetPrimaryButtonRight( |
| 1053 prefs->GetBoolean(prefs::kOwnerPrimaryMouseButtonRight)); | 1053 prefs->GetBoolean(prefs::kOwnerPrimaryMouseButtonRight)); |
| 1054 system::InputDeviceSettings::Get()->SetTapToClick( | 1054 system::InputDeviceSettings::Get()->SetTapToClick( |
| 1055 prefs->GetBoolean(prefs::kOwnerTapToClickEnabled)); | 1055 prefs->GetBoolean(prefs::kOwnerTapToClickEnabled)); |
| 1056 } | 1056 } |
| 1057 | 1057 system::InputDeviceSettings::Get()->SetNaturalScroll( |
| 1058 ui::SetNaturalScroll(CommandLine::ForCurrentProcess()->HasSwitch( | 1058 CommandLine::ForCurrentProcess()->HasSwitch( |
| 1059 switches::kNaturalScrollDefault)); | 1059 switches::kNaturalScrollDefault)); |
| 1060 | 1060 |
| 1061 gfx::Rect screen_bounds(chromeos::CalculateScreenBounds(gfx::Size())); | 1061 gfx::Rect screen_bounds(chromeos::CalculateScreenBounds(gfx::Size())); |
| 1062 | 1062 |
| 1063 // Check whether we need to execute OOBE process. | 1063 // Check whether we need to execute OOBE process. |
| 1064 bool oobe_complete = chromeos::StartupUtils::IsOobeCompleted(); | 1064 bool oobe_complete = chromeos::StartupUtils::IsOobeCompleted(); |
| 1065 if (!oobe_complete) { | 1065 if (!oobe_complete) { |
| 1066 LoginState::Get()->SetLoggedInState( | 1066 LoginState::Get()->SetLoggedInState( |
| 1067 LoginState::LOGGED_IN_OOBE, LoginState::LOGGED_IN_USER_NONE); | 1067 LoginState::LOGGED_IN_OOBE, LoginState::LOGGED_IN_USER_NONE); |
| 1068 } else { | 1068 } else { |
| 1069 LoginState::Get()->SetLoggedInState( | 1069 LoginState::Get()->SetLoggedInState( |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1162 scoped_ptr<locale_util::SwitchLanguageCallback> callback( | 1162 scoped_ptr<locale_util::SwitchLanguageCallback> callback( |
| 1163 new locale_util::SwitchLanguageCallback( | 1163 new locale_util::SwitchLanguageCallback( |
| 1164 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); | 1164 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); |
| 1165 | 1165 |
| 1166 // Load locale keyboards here. Hardware layout would be automatically enabled. | 1166 // Load locale keyboards here. Hardware layout would be automatically enabled. |
| 1167 locale_util::SwitchLanguage( | 1167 locale_util::SwitchLanguage( |
| 1168 locale, true, true /* login_layouts_only */, callback.Pass()); | 1168 locale, true, true /* login_layouts_only */, callback.Pass()); |
| 1169 } | 1169 } |
| 1170 | 1170 |
| 1171 } // namespace chromeos | 1171 } // namespace chromeos |
| OLD | NEW |