| 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/component_extension_ime_manager_i
mpl.h" | 5 #include "chrome/browser/chromeos/input_method/component_extension_ime_manager_i
mpl.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "chrome/browser/extensions/component_loader.h" | 10 #include "chrome/browser/extensions/component_loader.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 struct WhitelistedComponentExtensionIME { | 30 struct WhitelistedComponentExtensionIME { |
| 31 const char* id; | 31 const char* id; |
| 32 const char* path; | 32 const char* path; |
| 33 } whitelisted_component_extension[] = { | 33 } whitelisted_component_extension[] = { |
| 34 { | 34 { |
| 35 // ChromeOS Hangul Input. | 35 // ChromeOS Hangul Input. |
| 36 extension_ime_util::kHangulExtensionId, | 36 extension_ime_util::kHangulExtensionId, |
| 37 "/usr/share/chromeos-assets/input_methods/hangul", | 37 "/usr/share/chromeos-assets/input_methods/hangul", |
| 38 }, | 38 }, |
| 39 { | |
| 40 // Official Google Japanese Input. | |
| 41 extension_ime_util::kMozcExtensionId, | |
| 42 "/usr/share/chromeos-assets/input_methods/nacl_mozc", | |
| 43 }, | |
| 44 #if defined(OFFICIAL_BUILD) | 39 #if defined(OFFICIAL_BUILD) |
| 45 { | 40 { |
| 46 // Official Google XKB Input. | 41 // Official Google XKB Input. |
| 47 extension_ime_util::kXkbExtensionId, | 42 extension_ime_util::kXkbExtensionId, |
| 48 "/usr/share/chromeos-assets/input_methods/google_xkb", | 43 "/usr/share/chromeos-assets/input_methods/google_xkb", |
| 49 }, | 44 }, |
| 50 { | 45 { |
| 51 // Official Google Keyboards Input. | 46 // Official Google Keyboards Input. |
| 52 extension_ime_util::kM17nExtensionId, | 47 extension_ime_util::kM17nExtensionId, |
| 53 "/usr/share/chromeos-assets/input_methods/google_keyboards", | 48 "/usr/share/chromeos-assets/input_methods/google_keyboards", |
| (...skipping 22 matching lines...) Expand all Loading... |
| 76 { | 71 { |
| 77 // Open-sourced Zhuyin Chinese Input Method. | 72 // Open-sourced Zhuyin Chinese Input Method. |
| 78 extension_ime_util::kChineseZhuyinExtensionId, | 73 extension_ime_util::kChineseZhuyinExtensionId, |
| 79 "/usr/share/chromeos-assets/input_methods/zhuyin", | 74 "/usr/share/chromeos-assets/input_methods/zhuyin", |
| 80 }, | 75 }, |
| 81 { | 76 { |
| 82 // Open-sourced Cangjie Chinese Input Method. | 77 // Open-sourced Cangjie Chinese Input Method. |
| 83 extension_ime_util::kChineseCangjieExtensionId, | 78 extension_ime_util::kChineseCangjieExtensionId, |
| 84 "/usr/share/chromeos-assets/input_methods/cangjie", | 79 "/usr/share/chromeos-assets/input_methods/cangjie", |
| 85 }, | 80 }, |
| 81 { |
| 82 // Japanese Mozc Input. |
| 83 extension_ime_util::kMozcExtensionId, |
| 84 "/usr/share/chromeos-assets/input_methods/nacl_mozc", |
| 85 }, |
| 86 #endif | 86 #endif |
| 87 { | 87 { |
| 88 // Braille hardware keyboard IME that works together with ChromeVox. | 88 // Braille hardware keyboard IME that works together with ChromeVox. |
| 89 extension_misc::kBrailleImeExtensionId, | 89 extension_misc::kBrailleImeExtensionId, |
| 90 extension_misc::kBrailleImeExtensionPath, | 90 extension_misc::kBrailleImeExtensionPath, |
| 91 }, | 91 }, |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 extensions::ComponentLoader* GetComponentLoader() { | 94 extensions::ComponentLoader* GetComponentLoader() { |
| 95 // TODO(skuhne, nkostylev): At this time the only thing which makes sense here | 95 // TODO(skuhne, nkostylev): At this time the only thing which makes sense here |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 std::vector<ComponentExtensionIME>* result, | 338 std::vector<ComponentExtensionIME>* result, |
| 339 const base::Closure& callback) { | 339 const base::Closure& callback) { |
| 340 DCHECK(thread_checker_.CalledOnValidThread()); | 340 DCHECK(thread_checker_.CalledOnValidThread()); |
| 341 DCHECK(result); | 341 DCHECK(result); |
| 342 component_extension_list_ = *result; | 342 component_extension_list_ = *result; |
| 343 is_initialized_ = true; | 343 is_initialized_ = true; |
| 344 callback.Run(); | 344 callback.Run(); |
| 345 } | 345 } |
| 346 | 346 |
| 347 } // namespace chromeos | 347 } // namespace chromeos |
| OLD | NEW |