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/ui/webui/options/chromeos/cros_language_options_handler
.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/cros_language_options_handler
.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 return extension_ime_ids_list.release(); | 287 return extension_ime_ids_list.release(); |
288 } | 288 } |
289 | 289 |
290 input_method::InputMethodDescriptors descriptors = | 290 input_method::InputMethodDescriptors descriptors = |
291 component_extension_manager->GetAllIMEAsInputMethodDescriptor(); | 291 component_extension_manager->GetAllIMEAsInputMethodDescriptor(); |
292 for (size_t i = 0; i < descriptors.size(); ++i) { | 292 for (size_t i = 0; i < descriptors.size(); ++i) { |
293 const input_method::InputMethodDescriptor& descriptor = descriptors[i]; | 293 const input_method::InputMethodDescriptor& descriptor = descriptors[i]; |
294 scoped_ptr<DictionaryValue> dictionary(new DictionaryValue()); | 294 scoped_ptr<DictionaryValue> dictionary(new DictionaryValue()); |
295 dictionary->SetString("id", descriptor.id()); | 295 dictionary->SetString("id", descriptor.id()); |
296 dictionary->SetString("displayName", descriptor.name()); | 296 dictionary->SetString("displayName", descriptor.name()); |
| 297 dictionary->SetString("optionsPage", descriptor.options_page_url()); |
297 | 298 |
298 scoped_ptr<DictionaryValue> language_codes(new DictionaryValue()); | 299 scoped_ptr<DictionaryValue> language_codes(new DictionaryValue()); |
299 language_codes->SetBoolean(descriptor.language_code(), true); | 300 language_codes->SetBoolean(descriptor.language_code(), true); |
300 dictionary->Set("languageCodeSet", language_codes.release()); | 301 dictionary->Set("languageCodeSet", language_codes.release()); |
301 extension_ime_ids_list->Append(dictionary.release()); | 302 extension_ime_ids_list->Append(dictionary.release()); |
302 } | 303 } |
303 return extension_ime_ids_list.release(); | 304 return extension_ime_ids_list.release(); |
304 } | 305 } |
305 | 306 |
306 string16 CrosLanguageOptionsHandler::GetProductName() { | 307 string16 CrosLanguageOptionsHandler::GetProductName() { |
(...skipping 30 matching lines...) Expand all Loading... |
337 void CrosLanguageOptionsHandler::InputMethodOptionsOpenCallback( | 338 void CrosLanguageOptionsHandler::InputMethodOptionsOpenCallback( |
338 const ListValue* args) { | 339 const ListValue* args) { |
339 const std::string input_method_id = UTF16ToASCII(ExtractStringValue(args)); | 340 const std::string input_method_id = UTF16ToASCII(ExtractStringValue(args)); |
340 const std::string action = base::StringPrintf( | 341 const std::string action = base::StringPrintf( |
341 "InputMethodOptions_Open_%s", input_method_id.c_str()); | 342 "InputMethodOptions_Open_%s", input_method_id.c_str()); |
342 content::RecordComputedAction(action); | 343 content::RecordComputedAction(action); |
343 } | 344 } |
344 | 345 |
345 } // namespace options | 346 } // namespace options |
346 } // namespace chromeos | 347 } // namespace chromeos |
OLD | NEW |