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

Side by Side Diff: chrome/browser/chromeos/language_preferences.h

Issue 1631030: Adding Chrome preferences for ibus-pinyin. (Closed)
Patch Set: sync prefs Created 10 years, 8 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_CHROMEOS_LANGUAGE_PREFERENCES_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LANGUAGE_PREFERENCES_H_
6 #define CHROME_BROWSER_CHROMEOS_LANGUAGE_PREFERENCES_H_ 6 #define CHROME_BROWSER_CHROMEOS_LANGUAGE_PREFERENCES_H_
7 7
8 #include "chrome/common/pref_names.h"
9
10 // Section and config names for the IBus configuration daemon.
8 namespace chromeos { 11 namespace chromeos {
9 12
10 // For Korean IME (ibus-hangul) 13 // For ibus-daemon
14 const char kGeneralSectionName[] = "general";
15 const char kHotKeySectionName[] = "general/hotkey";
16 const char kUseGlobalEngineConfigName[] = "use_global_engine";
17 const char kPreloadEnginesConfigName[] = "preload_engines";
18 const char kNextEngineConfigName[] = "next_engine";
19 const char kTriggerConfigName[] = "trigger";
20
21 // TODO(yusukes): We'll add more "next engine" hot-keys like "Zenkaku_Hankaku"
22 // (Japanese keyboard specific).
23 const wchar_t kHotkeyNextEngine[] = L"Shift+Alt_L,Alt+Shift_L,Alt+grave";
24 const wchar_t kHotkeyTrigger[] = L""; // We don't allow users to disable IBus.
25
26 // For Korean input method (ibus-hangul)
27 const char kHangulSectionName[] = "engine/Hangul";
28 const char kHangulKeyboardConfigName[] = "HangulKeyboard";
29
11 const struct HangulKeyboardNameIDPair { 30 const struct HangulKeyboardNameIDPair {
12 const wchar_t* keyboard_name; 31 const wchar_t* keyboard_name;
13 const wchar_t* keyboard_id; 32 const wchar_t* keyboard_id;
14 } kHangulKeyboardNameIDPairs[] = { 33 } kHangulKeyboardNameIDPairs[] = {
15 // We have to sync the IDs with those in ibus-hangul/files/setup/main.py. 34 // We have to sync the IDs with those in ibus-hangul/files/setup/main.py.
16 { L"Dubeolsik", L"2" }, 35 { L"Dubeolsik", L"2" },
17 { L"Sebeolsik Final", L"3f" }, 36 { L"Sebeolsik Final", L"3f" },
18 { L"Sebeolsik 390", L"39" }, 37 { L"Sebeolsik 390", L"39" },
19 { L"Sebeolsik No-shift", L"3s" }, 38 { L"Sebeolsik No-shift", L"3s" },
20 { L"Sebeolsik 2 set", L"32" }, 39 { L"Sebeolsik 2 set", L"32" },
21 // TODO(yusukes): Use generated_resources.grd IDs for |keyboard_name|. Ask 40 // TODO(yusukes): Use generated_resources.grd IDs for |keyboard_name|. Ask
22 // jshin first. 41 // jshin first.
23 }; 42 };
24 43
25 // For ibus-daemon 44 // For Simplified Chinese input method (ibus-pinyin)
26 // TODO(yusukes): We'll add more "next engine" hot-keys like "Zenkaku_Hankaku" 45 const char kPinyinSectionName[] = "engine/Pinyin";
27 // (Japanese keyboard specific).
28 const wchar_t kHotkeyNextEngine[] = L"Shift+Alt_L,Alt+Shift_L,Alt+grave";
29 const wchar_t kHotkeyTrigger[] = L""; // We don't allow users to disable IBus.
30 46
31 // For Simplified Chinese IME (ibus-pinyin) 47 // We have to sync the |ibus_config_name|s with those in
32 // For Traditional Chinese IME (ibus-chewing) 48 // ibus-pinyin/files/src/Config.cc.
33 // For Japanese IME (ibus-google-japanese-input) 49 const struct {
50 const wchar_t* pref_name;
51 const char* ibus_config_name;
52 bool default_value;
53 } kPinyinBooleanPrefs[] = {
54 { prefs::kLanguagePinyinCorrectPinyin, "correct_pinyin", true },
55 { prefs::kLanguagePinyinFuzzyPinyin, "fuzzy_pinyin", false },
56 { prefs::kLanguagePinyinShiftSelectCandidate, "shift_select_candidate",
57 false },
58 { prefs::kLanguagePinyinMinusEqualPage, "minus_equal_page", true },
59 { prefs::kLanguagePinyinCommaPeriodPage, "comma_period_page", true },
60 { prefs::kLanguagePinyinAutoCommit, "auto_commit", false },
61 { prefs::kLanguagePinyinDoublePinyin, "double_pinyin", false },
62 { prefs::kLanguagePinyinInitChinese, "init_chinese", true },
63 { prefs::kLanguagePinyinInitFull, "init_full", false },
64 { prefs::kLanguagePinyinInitFullPunct, "init_full_punct", true },
65 { prefs::kLanguagePinyinInitSimplifiedChinese, "init_simplified_chinese",
66 true },
67 { prefs::kLanguagePinyinTradCandidate, "trad_candidate", false },
68 // TODO(yusukes): Support PINYIN_{INCOMPLETE,CORRECT,FUZZY}_... prefs (32
69 // additional boolean prefs.)
70 };
71
72 const struct {
73 const wchar_t* pref_name;
74 const char* ibus_config_name;
75 int default_value;
76 } kPinyinIntegerPrefs[] = {
77 { prefs::kLanguagePinyinDoublePinyinSchema, "double_pinyin_schema", 0 },
78 // TODO(yusukes): the type of lookup_table_page_size on ibus should be uint.
79 { prefs::kLanguagePinyinLookupTablePageSize, "lookup_table_page_size", 5 },
80 };
81
82 // For Traditional Chinese input method (ibus-chewing)
83
84 // For Japanese input method (ibus-mozc)
34 85
35 // TODO(yusukes): Add constants for these components. 86 // TODO(yusukes): Add constants for these components.
36 } // chromeos 87 } // chromeos
37 88
38 #endif // CHROME_BROWSER_CHROMEOS_LANGUAGE_PREFERENCES_H_ 89 #endif // CHROME_BROWSER_CHROMEOS_LANGUAGE_PREFERENCES_H_
39 90
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/cros_in_process_browser_test.cc ('k') | chrome/browser/chromeos/preferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698