diff options
author | komatsu@chromium.org <komatsu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-09 04:26:30 +0000 |
---|---|---|
committer | komatsu@chromium.org <komatsu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-09 04:26:30 +0000 |
commit | 1a936ba7ed7506773dd8f8a1de8af01ed97e9050 (patch) | |
tree | 688247268c731a214bbb8c3a04f528c15a032718 /chrome/browser/chromeos/input_method/input_method_manager_impl.cc | |
parent | a27d34ab68aa875f665b043129b6315dd9e62224 (diff) | |
download | chromium_src-1a936ba7ed7506773dd8f8a1de8af01ed97e9050.zip chromium_src-1a936ba7ed7506773dd8f8a1de8af01ed97e9050.tar.gz chromium_src-1a936ba7ed7506773dd8f8a1de8af01ed97e9050.tar.bz2 |
Refactoring around descriptor. The descriptor representing InputMethodEngine was previously generated in InpuMethodManager. This patch makes InputMethodEngine generates its own descriptor and manage it.
BUG=N/A
Review URL: https://codereview.chromium.org/119133003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243763 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/input_method/input_method_manager_impl.cc')
-rw-r--r-- | chrome/browser/chromeos/input_method/input_method_manager_impl.cc | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc index b9f307f..0b71019 100644 --- a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc +++ b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc @@ -420,11 +420,6 @@ void InputMethodManagerImpl::ActivateInputMethodProperty( void InputMethodManagerImpl::AddInputMethodExtension( const std::string& id, - const std::string& name, - const std::vector<std::string>& layouts, - const std::vector<std::string>& languages, - const GURL& options_url, - const GURL& inputview_url, InputMethodEngineInterface* engine) { if (state_ == STATE_TERMINATING) return; @@ -435,15 +430,17 @@ void InputMethodManagerImpl::AddInputMethodExtension( return; } - extra_input_methods_[id] = InputMethodDescriptor( - id, name, layouts, languages, false, options_url, inputview_url); + DCHECK(engine); + + const InputMethodDescriptor& descriptor = engine->GetDescriptor(); + extra_input_methods_[id] = descriptor; if (Contains(enabled_extension_imes_, id) && !extension_ime_util::IsComponentExtensionIME(id)) { if (!Contains(active_input_method_ids_, id)) { active_input_method_ids_.push_back(id); } else { DVLOG(1) << "AddInputMethodExtension: alread added: " - << id << ", " << name; + << id << ", " << descriptor.name(); // Call Start() anyway, just in case. } @@ -451,9 +448,7 @@ void InputMethodManagerImpl::AddInputMethodExtension( MaybeInitializeCandidateWindowController(); } - // TODO(komatsu): Engine should not be NULL even in unittests. - if (engine) - IBusBridge::Get()->SetEngineHandler(id, engine); + IBusBridge::Get()->SetEngineHandler(id, engine); } void InputMethodManagerImpl::RemoveInputMethodExtension(const std::string& id) { |