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 "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 } kMigrationInputMethodList[] = { | 48 } kMigrationInputMethodList[] = { |
49 { "mozc", "_comp_ime_fpfbhcjppmaeaijcidgiibchfbnhbeljnacl_mozc_us" }, | 49 { "mozc", "_comp_ime_fpfbhcjppmaeaijcidgiibchfbnhbeljnacl_mozc_us" }, |
50 { "mozc-jp", "_comp_ime_fpfbhcjppmaeaijcidgiibchfbnhbeljnacl_mozc_jp" }, | 50 { "mozc-jp", "_comp_ime_fpfbhcjppmaeaijcidgiibchfbnhbeljnacl_mozc_jp" }, |
51 { "mozc-dv", "_comp_ime_fpfbhcjppmaeaijcidgiibchfbnhbeljnacl_mozc_us" }, | 51 { "mozc-dv", "_comp_ime_fpfbhcjppmaeaijcidgiibchfbnhbeljnacl_mozc_us" }, |
52 { "pinyin", "_comp_ime_nmblnjkfdkabgdofidlkienfnnbjhnabzh-t-i0-pinyin" }, | 52 { "pinyin", "_comp_ime_nmblnjkfdkabgdofidlkienfnnbjhnabzh-t-i0-pinyin" }, |
53 { "pinyin-dv", "_comp_ime_nmblnjkfdkabgdofidlkienfnnbjhnabzh-t-i0-pinyin" }, | 53 { "pinyin-dv", "_comp_ime_nmblnjkfdkabgdofidlkienfnnbjhnabzh-t-i0-pinyin" }, |
54 { "mozc-chewing", | 54 { "mozc-chewing", |
55 "_comp_ime_ekbifjdfhkmdeeajnolmgdlmkllopefizh-hant-t-i0-und "}, | 55 "_comp_ime_ekbifjdfhkmdeeajnolmgdlmkllopefizh-hant-t-i0-und "}, |
56 { "m17n:zh:cangjie", | 56 { "m17n:zh:cangjie", |
57 "_comp_ime_gjhclobljhjhgoebiipblnmdodbmpdgdzh-hant-t-i0-cangjie-1987" }, | 57 "_comp_ime_gjhclobljhjhgoebiipblnmdodbmpdgdzh-hant-t-i0-cangjie-1987" }, |
| 58 // TODO(nona): Remove following migration map in M31. |
| 59 { "m17n:ta:itrans", |
| 60 "_comp_ime_jhffeifommiaekmbkkjlpmilogcfdohpvkd_ta_itrans" }, |
| 61 { "m17n:ta:tamil99", |
| 62 "_comp_ime_jhffeifommiaekmbkkjlpmilogcfdohpvkd_ta_tamil99" }, |
| 63 { "m17n:ta:typewriter", |
| 64 "_comp_ime_jhffeifommiaekmbkkjlpmilogcfdohpvkd_ta_typewriter" }, |
| 65 { "m17n:ta:inscript", |
| 66 "_comp_ime_jhffeifommiaekmbkkjlpmilogcfdohpvkd_ta_phone" }, |
| 67 { "m17n:ta:phonetic", |
| 68 "_comp_ime_jhffeifommiaekmbkkjlpmilogcfdohpvkd_ta_inscript" }, |
| 69 { "m17n:th:pattachote", |
| 70 "_comp_ime_jhffeifommiaekmbkkjlpmilogcfdohpvkd_th_pattajoti" }, |
| 71 { "m17n:th:tis820", "_comp_ime_jhffeifommiaekmbkkjlpmilogcfdohpvkd_th_tis" }, |
| 72 { "m17n:th:kesmanee", |
| 73 "_comp_ime_jhffeifommiaekmbkkjlpmilogcfdohpvkd_th" }, |
| 74 { "m17n:vi:tcvn", "_comp_ime_jhffeifommiaekmbkkjlpmilogcfdohpvkd_vi_tcvn" }, |
| 75 { "m17n:vi:viqr", "_comp_ime_jhffeifommiaekmbkkjlpmilogcfdohpvkd_vi_viqr" }, |
| 76 { "m17n:vi:telex", |
| 77 "_comp_ime_jhffeifommiaekmbkkjlpmilogcfdohpvkd_vi_telex" }, |
| 78 { "m17n:am:sera", |
| 79 "_comp_ime_jhffeifommiaekmbkkjlpmilogcfdohpvkd_ethi" }, |
| 80 { "m17n:bn:itrans", |
| 81 "_comp_ime_jhffeifommiaekmbkkjlpmilogcfdohpvkd_bn_phone" }, |
| 82 { "m17n:gu:itrans", |
| 83 "_comp_ime_jhffeifommiaekmbkkjlpmilogcfdohpvkd_gu_phone" }, |
| 84 { "m17n:hi:itrans", |
| 85 "_comp_ime_jhffeifommiaekmbkkjlpmilogcfdohpvkd_deva_phone" }, |
| 86 { "m17n:kn:itrans", |
| 87 "_comp_ime_jhffeifommiaekmbkkjlpmilogcfdohpvkd_kn_phone" }, |
| 88 { "m17n:ml:itrans", |
| 89 "_comp_ime_jhffeifommiaekmbkkjlpmilogcfdohpvkd_ml_phone" }, |
| 90 { "m17n:mr:itrans", |
| 91 "_comp_ime_jhffeifommiaekmbkkjlpmilogcfdohpvkd_deva_phone-" }, |
| 92 { "m17n:te:itrans", |
| 93 "_comp_ime_jhffeifommiaekmbkkjlpmilogcfdohpvkd_te_phone" }, |
| 94 { "m17n:fa:isiri", "_comp_ime_jhffeifommiaekmbkkjlpmilogcfdohpvkd_fa" }, |
58 }; | 95 }; |
59 | 96 |
60 } // namespace | 97 } // namespace |
61 | 98 |
62 InputMethodManagerImpl::InputMethodManagerImpl( | 99 InputMethodManagerImpl::InputMethodManagerImpl( |
63 scoped_ptr<InputMethodDelegate> delegate) | 100 scoped_ptr<InputMethodDelegate> delegate) |
64 : delegate_(delegate.Pass()), | 101 : delegate_(delegate.Pass()), |
65 state_(STATE_LOGIN_SCREEN), | 102 state_(STATE_LOGIN_SCREEN), |
66 util_(delegate_.get(), GetSupportedInputMethods()), | 103 util_(delegate_.get(), GetSupportedInputMethods()), |
67 component_extension_ime_manager_(new ComponentExtensionIMEManager()), | 104 component_extension_ime_manager_(new ComponentExtensionIMEManager()), |
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
868 else | 905 else |
869 DVLOG(1) << "Failed to initialize the candidate window controller"; | 906 DVLOG(1) << "Failed to initialize the candidate window controller"; |
870 } | 907 } |
871 | 908 |
872 bool InputMethodManagerImpl::IsIBusConnectionAlive() { | 909 bool InputMethodManagerImpl::IsIBusConnectionAlive() { |
873 return DBusThreadManager::Get() && DBusThreadManager::Get()->GetIBusClient(); | 910 return DBusThreadManager::Get() && DBusThreadManager::Get()->GetIBusClient(); |
874 } | 911 } |
875 | 912 |
876 } // namespace input_method | 913 } // namespace input_method |
877 } // namespace chromeos | 914 } // namespace chromeos |
OLD | NEW |