OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/login_display_host_impl.h" | 5 #include "chrome/browser/chromeos/login/ui/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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 const std::string first_screen_name; | 192 const std::string first_screen_name; |
193 const chromeos::StartupCustomizationDocument* const startup_manifest; | 193 const chromeos::StartupCustomizationDocument* const startup_manifest; |
194 chromeos::LoginDisplayHost* const display_host; | 194 chromeos::LoginDisplayHost* const display_host; |
195 | 195 |
196 // lock UI while resource bundle is being reloaded. | 196 // lock UI while resource bundle is being reloaded. |
197 chromeos::InputEventsBlocker events_blocker; | 197 chromeos::InputEventsBlocker events_blocker; |
198 }; | 198 }; |
199 | 199 |
200 void OnLanguageSwitchedCallback( | 200 void OnLanguageSwitchedCallback( |
201 scoped_ptr<ShowLoginWizardSwitchLanguageCallbackData> self, | 201 scoped_ptr<ShowLoginWizardSwitchLanguageCallbackData> self, |
202 const std::string& locale, | 202 scoped_ptr<chromeos::locale_util::LanguageSwitchResult> result) { |
203 const std::string& loaded_locale, | 203 if (!result->success) |
204 const bool success) { | 204 LOG(WARNING) << "Locale could not be found for '" |
205 if (!success) | 205 << result->requested_locale << "'"; |
206 LOG(WARNING) << "Locale could not be found for '" << locale << "'"; | |
207 | 206 |
208 ShowLoginWizardFinish( | 207 ShowLoginWizardFinish( |
209 self->first_screen_name, self->startup_manifest, self->display_host); | 208 self->first_screen_name, self->startup_manifest, self->display_host); |
210 } | 209 } |
211 | 210 |
212 void EnableSystemSoundsForAccessibility() { | 211 void EnableSystemSoundsForAccessibility() { |
213 chromeos::AccessibilityManager::Get()->EnableSystemSounds(true); | 212 chromeos::AccessibilityManager::Get()->EnableSystemSounds(true); |
214 } | 213 } |
215 | 214 |
216 // A login implementation of WidgetDelegate. | 215 // A login implementation of WidgetDelegate. |
(...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1293 scoped_ptr<locale_util::SwitchLanguageCallback> callback( | 1292 scoped_ptr<locale_util::SwitchLanguageCallback> callback( |
1294 new locale_util::SwitchLanguageCallback( | 1293 new locale_util::SwitchLanguageCallback( |
1295 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); | 1294 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); |
1296 | 1295 |
1297 // Load locale keyboards here. Hardware layout would be automatically enabled. | 1296 // Load locale keyboards here. Hardware layout would be automatically enabled. |
1298 locale_util::SwitchLanguage( | 1297 locale_util::SwitchLanguage( |
1299 locale, true, true /* login_layouts_only */, callback.Pass()); | 1298 locale, true, true /* login_layouts_only */, callback.Pass()); |
1300 } | 1299 } |
1301 | 1300 |
1302 } // namespace chromeos | 1301 } // namespace chromeos |
OLD | NEW |