| 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/chromeos/input_method/input_method_manager_impl.h" | 5 #include "chrome/browser/chromeos/input_method/input_method_manager_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> // std::find | 7 #include <algorithm> // std::find |
| 8 | 8 |
| 9 #include "ash/ime/input_method_menu_item.h" | 9 #include "ash/ime/input_method_menu_item.h" |
| 10 #include "ash/ime/input_method_menu_manager.h" | 10 #include "ash/ime/input_method_menu_manager.h" |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 FOR_EACH_OBSERVER(InputMethodManager::Observer, | 404 FOR_EACH_OBSERVER(InputMethodManager::Observer, |
| 405 observers_, | 405 observers_, |
| 406 InputMethodChanged(this, show_message)); | 406 InputMethodChanged(this, show_message)); |
| 407 return true; | 407 return true; |
| 408 } | 408 } |
| 409 | 409 |
| 410 void InputMethodManagerImpl::OnComponentExtensionInitialized( | 410 void InputMethodManagerImpl::OnComponentExtensionInitialized( |
| 411 scoped_ptr<ComponentExtensionIMEManagerDelegate> delegate) { | 411 scoped_ptr<ComponentExtensionIMEManagerDelegate> delegate) { |
| 412 DCHECK(thread_checker_.CalledOnValidThread()); | 412 DCHECK(thread_checker_.CalledOnValidThread()); |
| 413 component_extension_ime_manager_->Initialize(delegate.Pass()); | 413 component_extension_ime_manager_->Initialize(delegate.Pass()); |
| 414 util_.SetComponentExtensions( | 414 util_.ResetInputMethods( |
| 415 component_extension_ime_manager_->GetAllIMEAsInputMethodDescriptor()); | 415 component_extension_ime_manager_->GetAllIMEAsInputMethodDescriptor()); |
| 416 | 416 |
| 417 LoadNecessaryComponentExtensions(); | 417 LoadNecessaryComponentExtensions(); |
| 418 | 418 |
| 419 if (!pending_input_method_.empty()) | 419 if (!pending_input_method_.empty()) |
| 420 ChangeInputMethodInternal(pending_input_method_, false); | 420 ChangeInputMethodInternal(pending_input_method_, false); |
| 421 } | 421 } |
| 422 | 422 |
| 423 void InputMethodManagerImpl::LoadNecessaryComponentExtensions() { | 423 void InputMethodManagerImpl::LoadNecessaryComponentExtensions() { |
| 424 if (!component_extension_ime_manager_->IsInitialized()) | 424 if (!component_extension_ime_manager_->IsInitialized()) |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 CandidateWindowController::CreateCandidateWindowController()); | 854 CandidateWindowController::CreateCandidateWindowController()); |
| 855 candidate_window_controller_->AddObserver(this); | 855 candidate_window_controller_->AddObserver(this); |
| 856 } | 856 } |
| 857 | 857 |
| 858 Profile* InputMethodManagerImpl::GetProfile() const { | 858 Profile* InputMethodManagerImpl::GetProfile() const { |
| 859 return ProfileManager::GetActiveUserProfile(); | 859 return ProfileManager::GetActiveUserProfile(); |
| 860 } | 860 } |
| 861 | 861 |
| 862 } // namespace input_method | 862 } // namespace input_method |
| 863 } // namespace chromeos | 863 } // namespace chromeos |
| OLD | NEW |