Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc

Issue 309623005: Remove the flag g_use_wrapped_extension_keyboard_layouts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "chrome/browser/extensions/extension_service.h" 11 #include "chrome/browser/extensions/extension_service.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/profiles/profile_manager.h" 13 #include "chrome/browser/profiles/profile_manager.h"
14 #include "chrome/common/chrome_paths.h" 14 #include "chrome/common/chrome_paths.h"
15 #include "chrome/common/extensions/extension_constants.h" 15 #include "chrome/common/extensions/extension_constants.h"
16 #include "chrome/common/extensions/extension_file_util.h" 16 #include "chrome/common/extensions/extension_file_util.h"
17 #include "chromeos/ime/extension_ime_util.h"
17 #include "content/public/browser/browser_thread.h" 18 #include "content/public/browser/browser_thread.h"
18 #include "extensions/browser/extension_system.h" 19 #include "extensions/browser/extension_system.h"
19 #include "extensions/common/extension.h" 20 #include "extensions/common/extension.h"
20 #include "extensions/common/extension_l10n_util.h" 21 #include "extensions/common/extension_l10n_util.h"
21 #include "extensions/common/file_util.h" 22 #include "extensions/common/file_util.h"
22 #include "extensions/common/manifest_constants.h" 23 #include "extensions/common/manifest_constants.h"
23 #include "ui/base/l10n/l10n_util.h" 24 #include "ui/base/l10n/l10n_util.h"
24 25
25 namespace chromeos { 26 namespace chromeos {
26 27
27 namespace { 28 namespace {
28 29
29 struct WhitelistedComponentExtensionIME { 30 struct WhitelistedComponentExtensionIME {
30 const char* id; 31 const char* id;
31 const char* path; 32 const char* path;
32 } whitelisted_component_extension[] = { 33 } whitelisted_component_extension[] = {
33 { 34 {
34 // ChromeOS Hangul Input. 35 // ChromeOS Hangul Input.
35 "bdgdidmhaijohebebipajioienkglgfo", 36 extension_ime_util::kHangulExtensionId,
36 "/usr/share/chromeos-assets/input_methods/hangul", 37 "/usr/share/chromeos-assets/input_methods/hangul",
37 }, 38 },
39 {
40 // Official Google Japanese Input.
41 extension_ime_util::kMozcExtensionId,
42 "/usr/share/chromeos-assets/input_methods/nacl_mozc",
43 },
38 #if defined(OFFICIAL_BUILD) 44 #if defined(OFFICIAL_BUILD)
39 { 45 {
40 // Official Google XKB Input. 46 // Official Google XKB Input.
41 "jkghodnilhceideoidjikpgommlajknk", 47 extension_ime_util::kXkbExtensionId,
42 "/usr/share/chromeos-assets/input_methods/google_xkb", 48 "/usr/share/chromeos-assets/input_methods/google_xkb",
43 }, 49 },
44 { 50 {
45 // Official Google Keyboards Input. 51 // Official Google Keyboards Input.
46 "habcdindjejkmepknlhkkloncjcpcnbf", 52 extension_ime_util::kM17nExtensionId,
47 "/usr/share/chromeos-assets/input_methods/google_keyboards", 53 "/usr/share/chromeos-assets/input_methods/google_keyboards",
48 }, 54 },
49 { 55 {
50 // Official Google Japanese Input.
51 "fpfbhcjppmaeaijcidgiibchfbnhbelj",
52 "/usr/share/chromeos-assets/input_methods/nacl_mozc",
53 },
54 {
55 // Google input tools. 56 // Google input tools.
56 "gjaehgfemfahhmlgpdfknkhdnemmolop", 57 extension_ime_util::kT13nExtensionId,
57 "/usr/share/chromeos-assets/input_methods/input_tools", 58 "/usr/share/chromeos-assets/input_methods/input_tools",
58 }, 59 },
59 #else 60 #else
60 { 61 {
61 // Open-sourced ChromeOS xkb extension. 62 // Open-sourced ChromeOS xkb extension.
62 "fgoepimhcoialccpbmpnnblemnepkkao", 63 extension_ime_util::kXkbExtensionId,
63 "/usr/share/chromeos-assets/input_methods/xkb", 64 "/usr/share/chromeos-assets/input_methods/xkb",
64 }, 65 },
65 { 66 {
66 // Open-sourced ChromeOS Keyboards extension. 67 // Open-sourced ChromeOS Keyboards extension.
67 "jhffeifommiaekmbkkjlpmilogcfdohp", 68 extension_ime_util::kM17nExtensionId,
68 "/usr/share/chromeos-assets/input_methods/keyboard_layouts", 69 "/usr/share/chromeos-assets/input_methods/keyboard_layouts",
69 }, 70 },
70 { 71 {
71 // Open-sourced Pinyin Chinese Input Method. 72 // Open-sourced Pinyin Chinese Input Method.
72 "cpgalbafkoofkjmaeonnfijgpfennjjn", 73 extension_ime_util::kChinesePinyinExtensionId,
73 "/usr/share/chromeos-assets/input_methods/pinyin", 74 "/usr/share/chromeos-assets/input_methods/pinyin",
74 }, 75 },
75 { 76 {
76 // Open-sourced Zhuyin Chinese Input Method. 77 // Open-sourced Zhuyin Chinese Input Method.
77 "ekbifjdfhkmdeeajnolmgdlmkllopefi", 78 extension_ime_util::kChineseZhuyinExtensionId,
78 "/usr/share/chromeos-assets/input_methods/zhuyin", 79 "/usr/share/chromeos-assets/input_methods/zhuyin",
79 }, 80 },
80 { 81 {
81 // Open-sourced Cangjie Chinese Input Method. 82 // Open-sourced Cangjie Chinese Input Method.
82 "aeebooiibjahgpgmhkeocbeekccfknbj", 83 extension_ime_util::kChineseCangjieExtensionId,
83 "/usr/share/chromeos-assets/input_methods/cangjie", 84 "/usr/share/chromeos-assets/input_methods/cangjie",
84 }, 85 },
85 {
86 // Open-sourced Mozc Japanese Input.
87 "bbaiamgfapehflhememkfglaehiobjnk",
88 "/usr/share/chromeos-assets/input_methods/nacl_mozc",
89 },
90 #endif 86 #endif
91 { 87 {
92 // Braille hardware keyboard IME that works together with ChromeVox. 88 // Braille hardware keyboard IME that works together with ChromeVox.
93 extension_misc::kBrailleImeExtensionId, 89 extension_misc::kBrailleImeExtensionId,
94 extension_misc::kBrailleImeExtensionPath, 90 extension_misc::kBrailleImeExtensionPath,
95 }, 91 },
96 }; 92 };
97 93
98 extensions::ComponentLoader* GetComponentLoader() { 94 extensions::ComponentLoader* GetComponentLoader() {
99 // 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
342 std::vector<ComponentExtensionIME>* result, 338 std::vector<ComponentExtensionIME>* result,
343 const base::Closure& callback) { 339 const base::Closure& callback) {
344 DCHECK(thread_checker_.CalledOnValidThread()); 340 DCHECK(thread_checker_.CalledOnValidThread());
345 DCHECK(result); 341 DCHECK(result);
346 component_extension_list_ = *result; 342 component_extension_list_ = *result;
347 is_initialized_ = true; 343 is_initialized_ = true;
348 callback.Run(); 344 callback.Run();
349 } 345 }
350 346
351 } // namespace chromeos 347 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698