| 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 <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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |