Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc

Issue 14197006: Open input method configuration page in new tab page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/options/language_options.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/language_options.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698