OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/network_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/network_screen_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 } | 215 } |
216 return languages_list; | 216 return languages_list; |
217 } | 217 } |
218 | 218 |
219 ListValue* NetworkScreenHandler::GetInputMethods() { | 219 ListValue* NetworkScreenHandler::GetInputMethods() { |
220 ListValue* input_methods_list = new ListValue; | 220 ListValue* input_methods_list = new ListValue; |
221 input_method::InputMethodManager* manager = | 221 input_method::InputMethodManager* manager = |
222 input_method::InputMethodManager::GetInstance(); | 222 input_method::InputMethodManager::GetInstance(); |
223 scoped_ptr<input_method::InputMethodDescriptors> input_methods( | 223 scoped_ptr<input_method::InputMethodDescriptors> input_methods( |
224 manager->GetActiveInputMethods()); | 224 manager->GetActiveInputMethods()); |
225 std::string current_input_method_id = manager->current_input_method().id(); | 225 std::string current_input_method_id = manager->GetCurrentInputMethod().id(); |
226 for (size_t i = 0; i < input_methods->size(); ++i) { | 226 for (size_t i = 0; i < input_methods->size(); ++i) { |
227 DictionaryValue* input_method = new DictionaryValue; | 227 DictionaryValue* input_method = new DictionaryValue; |
228 input_method->SetString("value", input_methods->at(i).id()); | 228 input_method->SetString("value", input_methods->at(i).id()); |
229 input_method->SetString( | 229 input_method->SetString( |
230 "title", InputMethodMenu::GetTextForMenu(input_methods->at(i))); | 230 "title", InputMethodMenu::GetTextForMenu(input_methods->at(i))); |
231 input_method->SetBoolean("selected", | 231 input_method->SetBoolean("selected", |
232 input_methods->at(i).id() == current_input_method_id); | 232 input_methods->at(i).id() == current_input_method_id); |
233 input_methods_list->Append(input_method); | 233 input_methods_list->Append(input_method); |
234 } | 234 } |
235 return input_methods_list; | 235 return input_methods_list; |
236 } | 236 } |
237 | 237 |
238 } // namespace chromeos | 238 } // namespace chromeos |
OLD | NEW |