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

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

Issue 190033005: [IME] Removes the duplicated IMEs in chrome://settings/languages, and support async component IMEs … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try to make test green. Created 6 years, 9 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 | Annotate | Revision Log
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 <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 SINGLETON_TAB, 443 SINGLETON_TAB,
444 content::PAGE_TRANSITION_LINK, 444 content::PAGE_TRANSITION_LINK,
445 false); 445 false);
446 browser->OpenURL(params); 446 browser->OpenURL(params);
447 browser->window()->Show(); 447 browser->window()->Show();
448 content::WebContents* web_contents = 448 content::WebContents* web_contents =
449 browser->tab_strip_model()->GetActiveWebContents(); 449 browser->tab_strip_model()->GetActiveWebContents();
450 web_contents->GetDelegate()->ActivateContents(web_contents); 450 web_contents->GetDelegate()->ActivateContents(web_contents);
451 } 451 }
452 452
453 void CrosLanguageOptionsHandler::OnInitialized() { 453 void CrosLanguageOptionsHandler::OnImeComponentExtensionInitialized() {
454 if (composition_extension_appended_ || !is_page_initialized_) { 454 if (composition_extension_appended_ || !is_page_initialized_) {
455 // If an option page is not ready to call JavaScript, appending component 455 // If an option page is not ready to call JavaScript, appending component
456 // extension IMEs will be done in InitializePage function later. 456 // extension IMEs will be done in InitializePage function later.
457 return; 457 return;
458 } 458 }
459 459
460 ComponentExtensionIMEManager* manager = 460 ComponentExtensionIMEManager* manager =
461 input_method::InputMethodManager::Get() 461 input_method::InputMethodManager::Get()
462 ->GetComponentExtensionIMEManager(); 462 ->GetComponentExtensionIMEManager();
463 463
(...skipping 25 matching lines...) Expand all
489 ConvertInputMethodDescriptosToIMEList( 489 ConvertInputMethodDescriptosToIMEList(
490 component_extension_manager->GetAllIMEAsInputMethodDescriptor())); 490 component_extension_manager->GetAllIMEAsInputMethodDescriptor()));
491 web_ui()->CallJavascriptFunction( 491 web_ui()->CallJavascriptFunction(
492 "options.LanguageOptions.onComponentManagerInitialized", 492 "options.LanguageOptions.onComponentManagerInitialized",
493 *ime_list); 493 *ime_list);
494 composition_extension_appended_ = true; 494 composition_extension_appended_ = true;
495 } 495 }
496 496
497 } // namespace options 497 } // namespace options
498 } // namespace chromeos 498 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698