| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_engine.h" | 5 #include "chrome/browser/chromeos/input_method/input_method_engine.h" |
| 6 | 6 |
| 7 #undef FocusIn | 7 #undef FocusIn |
| 8 #undef FocusOut | 8 #undef FocusOut |
| 9 #undef RootWindow | 9 #undef RootWindow |
| 10 #include <map> | 10 #include <map> |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 // TODO(komatsu): It is probably better to set observer out of Initialize. | 142 // TODO(komatsu): It is probably better to set observer out of Initialize. |
| 143 observer_ = observer.Pass(); | 143 observer_ = observer.Pass(); |
| 144 engine_id_ = engine_id; | 144 engine_id_ = engine_id; |
| 145 extension_id_ = extension_id; | 145 extension_id_ = extension_id; |
| 146 | 146 |
| 147 input_method::InputMethodManager* manager = | 147 input_method::InputMethodManager* manager = |
| 148 input_method::InputMethodManager::Get(); | 148 input_method::InputMethodManager::Get(); |
| 149 ComponentExtensionIMEManager* comp_ext_ime_manager = | 149 ComponentExtensionIMEManager* comp_ext_ime_manager = |
| 150 manager->GetComponentExtensionIMEManager(); | 150 manager->GetComponentExtensionIMEManager(); |
| 151 | 151 |
| 152 if (comp_ext_ime_manager && comp_ext_ime_manager->IsInitialized() && | 152 if (comp_ext_ime_manager->IsWhitelistedExtension(extension_id)) { |
| 153 comp_ext_ime_manager->IsWhitelistedExtension(extension_id)) { | |
| 154 imm_id_ = comp_ext_ime_manager->GetId(extension_id, engine_id); | 153 imm_id_ = comp_ext_ime_manager->GetId(extension_id, engine_id); |
| 155 } else { | 154 } else { |
| 156 imm_id_ = extension_ime_util::GetInputMethodID(extension_id, engine_id); | 155 imm_id_ = extension_ime_util::GetInputMethodID(extension_id, engine_id); |
| 157 } | 156 } |
| 158 | 157 |
| 159 input_view_url_ = input_view; | 158 input_view_url_ = input_view; |
| 160 descriptor_ = input_method::InputMethodDescriptor( | 159 descriptor_ = input_method::InputMethodDescriptor( |
| 161 imm_id_, | 160 imm_id_, |
| 162 engine_name, | 161 engine_name, |
| 163 std::string(), // TODO(uekawa): Set short name. | 162 std::string(), // TODO(uekawa): Set short name. |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 // TODO(nona): Implement it. | 678 // TODO(nona): Implement it. |
| 680 break; | 679 break; |
| 681 } | 680 } |
| 682 } | 681 } |
| 683 } | 682 } |
| 684 | 683 |
| 685 // TODO(nona): Support item.children. | 684 // TODO(nona): Support item.children. |
| 686 } | 685 } |
| 687 | 686 |
| 688 } // namespace chromeos | 687 } // namespace chromeos |
| OLD | NEW |