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/ui/webui/chromeos/login/l10n_util.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/l10n_util.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 language_info->SetBoolean("selected", true); | 415 language_info->SetBoolean("selected", true); |
416 } | 416 } |
417 } | 417 } |
418 | 418 |
419 } // namespace | 419 } // namespace |
420 | 420 |
421 void ResolveUILanguageList( | 421 void ResolveUILanguageList( |
422 scoped_ptr<chromeos::locale_util::LanguageSwitchResult> | 422 scoped_ptr<chromeos::locale_util::LanguageSwitchResult> |
423 language_switch_result, | 423 language_switch_result, |
424 UILanguageListResolvedCallback callback) { | 424 UILanguageListResolvedCallback callback) { |
425 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 425 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
426 | 426 |
427 scoped_ptr<scoped_ptr<base::ListValue>> new_language_list( | 427 scoped_ptr<scoped_ptr<base::ListValue>> new_language_list( |
428 new scoped_ptr<base::ListValue>()); | 428 new scoped_ptr<base::ListValue>()); |
429 scoped_ptr<std::string> new_language_list_locale(new std::string); | 429 scoped_ptr<std::string> new_language_list_locale(new std::string); |
430 scoped_ptr<std::string> new_selected_language(new std::string); | 430 scoped_ptr<std::string> new_selected_language(new std::string); |
431 | 431 |
432 base::Closure resolve_on_pool = | 432 base::Closure resolve_on_pool = |
433 base::Bind(&ResolveLanguageListOnBlockingPool, | 433 base::Bind(&ResolveLanguageListOnBlockingPool, |
434 base::Owned(language_switch_result.release()), | 434 base::Owned(language_switch_result.release()), |
435 base::Unretained(new_language_list.get()), | 435 base::Unretained(new_language_list.get()), |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 scoped_ptr<base::DictionaryValue> GetCurrentKeyboardLayout() { | 613 scoped_ptr<base::DictionaryValue> GetCurrentKeyboardLayout() { |
614 const input_method::InputMethodDescriptor current_input_method = | 614 const input_method::InputMethodDescriptor current_input_method = |
615 input_method::InputMethodManager::Get() | 615 input_method::InputMethodManager::Get() |
616 ->GetActiveIMEState() | 616 ->GetActiveIMEState() |
617 ->GetCurrentInputMethod(); | 617 ->GetCurrentInputMethod(); |
618 return CreateInputMethodsEntry(current_input_method, | 618 return CreateInputMethodsEntry(current_input_method, |
619 current_input_method.id()); | 619 current_input_method.id()); |
620 } | 620 } |
621 | 621 |
622 } // namespace chromeos | 622 } // namespace chromeos |
OLD | NEW |