summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-27 18:10:30 +0000
committeryusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-27 18:10:30 +0000
commit594b8f5fbe9c4838ea6e3f46814986357fbbbea2 (patch)
tree9ace51b2e5c63bd5df4f76f038ced1601e8a7a18
parent85a815ca044d81e4d32a7423a8975f2269f605ec (diff)
downloadchromium_src-594b8f5fbe9c4838ea6e3f46814986357fbbbea2.zip
chromium_src-594b8f5fbe9c4838ea6e3f46814986357fbbbea2.tar.gz
chromium_src-594b8f5fbe9c4838ea6e3f46814986357fbbbea2.tar.bz2
Adding a configuration dialog for Pinyin input method.
BUG=crosbug.com/491 BUG=crosbug.com/2623 TEST=manual Review URL: http://codereview.chromium.org/1694017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45725 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/generated_resources.grd52
-rw-r--r--chrome/browser/chromeos/language_preferences.h42
-rw-r--r--chrome/browser/chromeos/options/language_config_view.cc6
-rw-r--r--chrome/browser/chromeos/options/language_pinyin_config_view.cc111
-rw-r--r--chrome/browser/chromeos/options/language_pinyin_config_view.h65
-rw-r--r--chrome/browser/chromeos/preferences.cc12
-rw-r--r--chrome/browser/chromeos/preferences.h6
-rw-r--r--chrome/chrome.gyp10
-rw-r--r--chrome/chrome_browser.gypi2
9 files changed, 283 insertions, 23 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 741b281..dedc25c 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -7434,6 +7434,58 @@ Keep your key file in a safe place. You will need it to create new versions of y
desc="The title for the Hangul input settings dialog">
Hangul Input Settings
</message>
+ <message name="IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTINGS_TITLE"
+ desc="The title for the Pinyin input settings dialog">
+ Pinyin Input Settings
+ </message>
+ <message name="IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_CORRECT_PINYIN"
+ desc="The checkbox label for a Pinyin input method preference">
+ Automatically correct input
+ </message>
+ <message name="IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_FUZZY_PINYIN"
+ desc="The checkbox label for a Pinyin input method preference">
+ Enable Fuzzy-Pinyin mode
+ </message>
+ <message name="IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_SHIFT_SELECT_PINYIN"
+ desc="The checkbox label for a Pinyin input method preference">
+ Use Shift to select a candidate
+ </message>
+ <message name="IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_MINUS_EQUAL_PAGE"
+ desc="The checkbox label for a Pinyin input method preference">
+ Use - and = keys to page a candidate list
+ </message>
+ <message name="IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_COMMA_PERIOD_PAGE"
+ desc="The checkbox label for a Pinyin input method preference">
+ Use , and . keys to page a candidate list
+ </message>
+ <message name="IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_AUTO_COMMIT"
+ desc="The checkbox label for a Pinyin input method preference">
+ Auto-commit a string
+ </message>
+ <message name="IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_DOUBLE_PINYIN"
+ desc="The checkbox label for a Pinyin input method preference">
+ Enable Double-Pinyin mode
+ </message>
+ <message name="IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_CHINESE"
+ desc="The checkbox label for a Pinyin input method preference">
+ Initial input language is Chinese
+ </message>
+ <message name="IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_FULL"
+ desc="The checkbox label for a Pinyin input method preference">
+ Initial character width is Full
+ </message>
+ <message name="IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_FULL_PUNCT"
+ desc="The checkbox label for a Pinyin input method preference">
+ Initial punctuation width is Full
+ </message>
+ <message name="IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_SIMPLIFIED_CHINESE"
+ desc="The checkbox label for a Pinyin input method preference">
+ Initial Chinese mode is Simplified Chinese
+ </message>
+ <message name="IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_TRAD_CANDIDATE"
+ desc="The checkbox label for a Pinyin input method preference">
+ Display candidates in Traditional Chinese
+ </message>
<message name="IDS_OPTIONS_SETTINGS_LANGUAGES_CONFIGURE"
desc="The label for the configure button for input methods">
Configure...
diff --git a/chrome/browser/chromeos/language_preferences.h b/chrome/browser/chromeos/language_preferences.h
index add4a2a..359e07c 100644
--- a/chrome/browser/chromeos/language_preferences.h
+++ b/chrome/browser/chromeos/language_preferences.h
@@ -5,7 +5,9 @@
#ifndef CHROME_BROWSER_CHROMEOS_LANGUAGE_PREFERENCES_H_
#define CHROME_BROWSER_CHROMEOS_LANGUAGE_PREFERENCES_H_
+#include "base/basictypes.h"
#include "chrome/common/pref_names.h"
+#include "grit/generated_resources.h"
// Section and config names for the IBus configuration daemon.
namespace chromeos {
@@ -50,34 +52,49 @@ const struct {
const wchar_t* pref_name;
const char* ibus_config_name;
bool default_value;
+ int message_id;
} kPinyinBooleanPrefs[] = {
- { prefs::kLanguagePinyinCorrectPinyin, "correct_pinyin", true },
- { prefs::kLanguagePinyinFuzzyPinyin, "fuzzy_pinyin", false },
+ { prefs::kLanguagePinyinCorrectPinyin, "correct_pinyin", true,
+ IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_CORRECT_PINYIN },
+ { prefs::kLanguagePinyinFuzzyPinyin, "fuzzy_pinyin", false,
+ IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_FUZZY_PINYIN },
{ prefs::kLanguagePinyinShiftSelectCandidate, "shift_select_candidate",
- false },
- { prefs::kLanguagePinyinMinusEqualPage, "minus_equal_page", true },
- { prefs::kLanguagePinyinCommaPeriodPage, "comma_period_page", true },
- { prefs::kLanguagePinyinAutoCommit, "auto_commit", false },
- { prefs::kLanguagePinyinDoublePinyin, "double_pinyin", false },
- { prefs::kLanguagePinyinInitChinese, "init_chinese", true },
- { prefs::kLanguagePinyinInitFull, "init_full", false },
- { prefs::kLanguagePinyinInitFullPunct, "init_full_punct", true },
+ false, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_SHIFT_SELECT_PINYIN },
+ { prefs::kLanguagePinyinMinusEqualPage, "minus_equal_page", true,
+ IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_MINUS_EQUAL_PAGE },
+ { prefs::kLanguagePinyinCommaPeriodPage, "comma_period_page", true,
+ IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_COMMA_PERIOD_PAGE },
+ { prefs::kLanguagePinyinAutoCommit, "auto_commit", false,
+ IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_AUTO_COMMIT },
+ { prefs::kLanguagePinyinDoublePinyin, "double_pinyin", false,
+ IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_DOUBLE_PINYIN },
+ { prefs::kLanguagePinyinInitChinese, "init_chinese", true,
+ IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_CHINESE },
+ { prefs::kLanguagePinyinInitFull, "init_full", false,
+ IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_FULL },
+ { prefs::kLanguagePinyinInitFullPunct, "init_full_punct", true,
+ IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_FULL_PUNCT },
{ prefs::kLanguagePinyinInitSimplifiedChinese, "init_simplified_chinese",
- true },
- { prefs::kLanguagePinyinTradCandidate, "trad_candidate", false },
+ true,
+ IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_SIMPLIFIED_CHINESE },
+ { prefs::kLanguagePinyinTradCandidate, "trad_candidate", false,
+ IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_TRAD_CANDIDATE },
// TODO(yusukes): Support PINYIN_{INCOMPLETE,CORRECT,FUZZY}_... prefs (32
// additional boolean prefs.)
};
+const size_t kNumPinyinBooleanPrefs = ARRAYSIZE_UNSAFE(kPinyinBooleanPrefs);
const struct {
const wchar_t* pref_name;
const char* ibus_config_name;
int default_value;
+ // TODO(yusukes): Add message_id if needed.
} kPinyinIntegerPrefs[] = {
{ prefs::kLanguagePinyinDoublePinyinSchema, "double_pinyin_schema", 0 },
// TODO(yusukes): the type of lookup_table_page_size on ibus should be uint.
{ prefs::kLanguagePinyinLookupTablePageSize, "lookup_table_page_size", 5 },
};
+const size_t kNumPinyinIntegerPrefs = ARRAYSIZE_UNSAFE(kPinyinIntegerPrefs);
// For Traditional Chinese input method (ibus-chewing)
@@ -87,4 +104,3 @@ const struct {
} // chromeos
#endif // CHROME_BROWSER_CHROMEOS_LANGUAGE_PREFERENCES_H_
-
diff --git a/chrome/browser/chromeos/options/language_config_view.cc b/chrome/browser/chromeos/options/language_config_view.cc
index 4944312..8fe1f75 100644
--- a/chrome/browser/chromeos/options/language_config_view.cc
+++ b/chrome/browser/chromeos/options/language_config_view.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/chromeos/cros/cros_library.h"
#include "chrome/browser/chromeos/cros/language_library.h"
#include "chrome/browser/chromeos/options/language_hangul_config_view.h"
+#include "chrome/browser/chromeos/options/language_pinyin_config_view.h"
#include "chrome/browser/chromeos/options/options_window_view.h"
#include "chrome/browser/chromeos/preferences.h"
#include "chrome/browser/language_combobox_model.h"
@@ -45,6 +46,9 @@ const char kDefaultLanguageCode[] = "eng";
views::DialogDelegate* CreateLanguageHangulConfigView(Profile* profile) {
return new LanguageHangulConfigView(profile);
}
+views::DialogDelegate* CreateLanguagePinyinConfigView(Profile* profile) {
+ return new LanguagePinyinConfigView(profile);
+}
// The tags are used to identify buttons in ButtonPressed().
enum ButtonTag {
@@ -560,6 +564,8 @@ void LanguageConfigView::InitControlLayout() {
void LanguageConfigView::InitInputMethodConfigViewMap() {
input_method_config_view_map_["hangul"] =
CreateLanguageHangulConfigView;
+ input_method_config_view_map_["pinyin"] =
+ CreateLanguagePinyinConfigView;
}
void LanguageConfigView::InitInputMethodIdMaps() {
diff --git a/chrome/browser/chromeos/options/language_pinyin_config_view.cc b/chrome/browser/chromeos/options/language_pinyin_config_view.cc
new file mode 100644
index 0000000..c04e4c2
--- /dev/null
+++ b/chrome/browser/chromeos/options/language_pinyin_config_view.cc
@@ -0,0 +1,111 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/chromeos/options/language_pinyin_config_view.h"
+
+#include "app/combobox_model.h"
+#include "app/l10n_util.h"
+#include "base/utf_string_conversions.h"
+#include "chrome/common/notification_type.h"
+#include "chrome/common/pref_names.h"
+#include "chrome/browser/chromeos/cros/cros_library.h"
+#include "chrome/browser/chromeos/cros/language_library.h"
+#include "chrome/browser/chromeos/preferences.h"
+#include "chrome/browser/profile.h"
+#include "grit/generated_resources.h"
+#include "grit/locale_settings.h"
+#include "views/controls/button/checkbox.h"
+#include "views/controls/label.h"
+#include "views/grid_layout.h"
+#include "views/standard_layout.h"
+#include "views/window/window.h"
+
+namespace chromeos {
+
+LanguagePinyinConfigView::LanguagePinyinConfigView(Profile* profile)
+ : OptionsPageView(profile), contents_(NULL) {
+ for (size_t i = 0; i < kNumPinyinBooleanPrefs; ++i) {
+ pinyin_boolean_prefs_[i].Init(
+ kPinyinBooleanPrefs[i].pref_name, profile->GetPrefs(), this);
+ pinyin_boolean_checkboxes_[i] = NULL;
+ }
+}
+
+LanguagePinyinConfigView::~LanguagePinyinConfigView() {
+}
+
+void LanguagePinyinConfigView::ButtonPressed(
+ views::Button* sender, const views::Event& event) {
+ views::Checkbox* checkbox = static_cast<views::Checkbox*>(sender);
+ const int pref_id = checkbox->tag();
+ DCHECK(pref_id >= 0 && pref_id < static_cast<int>(kNumPinyinBooleanPrefs));
+ pinyin_boolean_prefs_[pref_id].SetValue(checkbox->checked());
+}
+
+void LanguagePinyinConfigView::Layout() {
+ // Not sure why but this is needed to show contents in the dialog.
+ contents_->SetBounds(0, 0, width(), height());
+}
+
+std::wstring LanguagePinyinConfigView::GetWindowTitle() const {
+ return l10n_util::GetString(
+ IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTINGS_TITLE);
+}
+
+gfx::Size LanguagePinyinConfigView::GetPreferredSize() {
+ // TODO(satorux): Create our own localized content size once the UI is done.
+ return gfx::Size(views::Window::GetLocalizedContentsSize(
+ IDS_FONTSLANG_DIALOG_WIDTH_CHARS,
+ IDS_FONTSLANG_DIALOG_HEIGHT_LINES));
+}
+
+void LanguagePinyinConfigView::InitControlLayout() {
+ using views::ColumnSet;
+ using views::GridLayout;
+
+ contents_ = new views::View;
+ AddChildView(contents_);
+
+ GridLayout* layout = new GridLayout(contents_);
+ layout->SetInsets(kPanelVertMargin, kPanelHorizMargin,
+ kPanelVertMargin, kPanelHorizMargin);
+ contents_->SetLayoutManager(layout);
+
+ const int kColumnSetId = 0;
+ ColumnSet* column_set = layout->AddColumnSet(kColumnSetId);
+ column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0,
+ GridLayout::USE_PREF, 0, 0);
+ column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing);
+ column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0,
+ GridLayout::USE_PREF, 0, 0);
+
+ for (size_t i = 0; i < kNumPinyinBooleanPrefs; ++i) {
+ pinyin_boolean_checkboxes_[i] = new views::Checkbox(
+ l10n_util::GetString(kPinyinBooleanPrefs[i].message_id));
+ pinyin_boolean_checkboxes_[i]->set_listener(this);
+ pinyin_boolean_checkboxes_[i]->set_tag(i);
+ }
+ NotifyPrefChanged();
+ for (size_t i = 0; i < kNumPinyinBooleanPrefs; ++i) {
+ layout->StartRow(0, kColumnSetId);
+ layout->AddView(pinyin_boolean_checkboxes_[i]);
+ }
+}
+
+void LanguagePinyinConfigView::Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details) {
+ if (type == NotificationType::PREF_CHANGED) {
+ NotifyPrefChanged();
+ }
+}
+
+void LanguagePinyinConfigView::NotifyPrefChanged() {
+ for (size_t i = 0; i < kNumPinyinBooleanPrefs; ++i) {
+ const bool checked = pinyin_boolean_prefs_[i].GetValue();
+ pinyin_boolean_checkboxes_[i]->SetChecked(checked);
+ }
+}
+
+} // namespace chromeos
diff --git a/chrome/browser/chromeos/options/language_pinyin_config_view.h b/chrome/browser/chromeos/options/language_pinyin_config_view.h
new file mode 100644
index 0000000..76e0cd9
--- /dev/null
+++ b/chrome/browser/chromeos/options/language_pinyin_config_view.h
@@ -0,0 +1,65 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_LANGUAGE_PINYIN_CONFIG_VIEW_H_
+#define CHROME_BROWSER_CHROMEOS_OPTIONS_LANGUAGE_PINYIN_CONFIG_VIEW_H_
+
+#include <string>
+
+#include "chrome/browser/chromeos/cros/language_library.h"
+#include "chrome/browser/chromeos/language_preferences.h"
+#include "chrome/browser/pref_member.h"
+#include "chrome/browser/views/options/options_page_view.h"
+#include "views/controls/button/checkbox.h"
+#include "views/controls/label.h"
+#include "views/window/dialog_delegate.h"
+
+namespace chromeos {
+
+// A dialog box for showing Traditional Chinese (Pinyin) input method
+// preferences.
+class LanguagePinyinConfigView : public views::ButtonListener,
+ public views::DialogDelegate,
+ public OptionsPageView {
+ public:
+ explicit LanguagePinyinConfigView(Profile* profile);
+ virtual ~LanguagePinyinConfigView();
+
+ // views::ButtonListener overrides.
+ virtual void ButtonPressed(views::Button* sender, const views::Event& event);
+
+ // views::DialogDelegate overrides.
+ virtual bool IsModal() const { return true; }
+ virtual views::View* GetContentsView() { return this; }
+ virtual std::wstring GetWindowTitle() const;
+
+ // views::View overrides.
+ virtual void Layout();
+ virtual gfx::Size GetPreferredSize();
+
+ // OptionsPageView overrides.
+ virtual void InitControlLayout();
+
+ // NotificationObserver overrides.
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
+ private:
+ // Updates the pinyin checkboxes.
+ void NotifyPrefChanged();
+
+ BooleanPrefMember pinyin_boolean_prefs_[kNumPinyinBooleanPrefs];
+ // TODO(yusukes): Support integer prefs if needed.
+ views::View* contents_;
+
+ // A checkboxes for Pinyin.
+ views::Checkbox* pinyin_boolean_checkboxes_[kNumPinyinBooleanPrefs];
+
+ DISALLOW_COPY_AND_ASSIGN(LanguagePinyinConfigView);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_OPTIONS_LANGUAGE_PINYIN_CONFIG_VIEW_H_
diff --git a/chrome/browser/chromeos/preferences.cc b/chrome/browser/chromeos/preferences.cc
index a1e62a0..63d233a 100644
--- a/chrome/browser/chromeos/preferences.cc
+++ b/chrome/browser/chromeos/preferences.cc
@@ -32,11 +32,11 @@ void Preferences::RegisterUserPrefs(PrefService* prefs) {
UTF8ToWide(kFallbackInputMethodId)); // EN layout
prefs->RegisterStringPref(prefs::kLanguageHangulKeyboard,
kHangulKeyboardNameIDPairs[0].keyboard_id);
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kPinyinBooleanPrefs); ++i) {
+ for (size_t i = 0; i < kNumPinyinBooleanPrefs; ++i) {
prefs->RegisterBooleanPref(kPinyinBooleanPrefs[i].pref_name,
kPinyinBooleanPrefs[i].default_value);
}
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kPinyinIntegerPrefs); ++i) {
+ for (size_t i = 0; i < kNumPinyinIntegerPrefs; ++i) {
prefs->RegisterIntegerPref(kPinyinIntegerPrefs[i].pref_name,
kPinyinIntegerPrefs[i].default_value);
}
@@ -55,11 +55,11 @@ void Preferences::Init(PrefService* prefs) {
language_hotkey_trigger_.Init(prefs::kLanguageHotkeyTrigger, prefs, this);
language_preload_engines_.Init(prefs::kLanguagePreloadEngines, prefs, this);
language_hangul_keyboard_.Init(prefs::kLanguageHangulKeyboard, prefs, this);
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kPinyinBooleanPrefs); ++i) {
+ for (size_t i = 0; i < kNumPinyinBooleanPrefs; ++i) {
language_pinyin_boolean_prefs_[i].Init(
kPinyinBooleanPrefs[i].pref_name, prefs, this);
}
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kPinyinIntegerPrefs); ++i) {
+ for (size_t i = 0; i < kNumPinyinIntegerPrefs; ++i) {
language_pinyin_int_prefs_[i].Init(
kPinyinIntegerPrefs[i].pref_name, prefs, this);
}
@@ -112,14 +112,14 @@ void Preferences::NotifyPrefChanged(const std::wstring* pref_name) {
if (!pref_name || *pref_name == prefs::kLanguageHangulKeyboard)
SetLanguageConfigString(kHangulSectionName, kHangulKeyboardConfigName,
language_hangul_keyboard_.GetValue());
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kPinyinBooleanPrefs); ++i) {
+ for (size_t i = 0; i < kNumPinyinBooleanPrefs; ++i) {
if (!pref_name || *pref_name == kPinyinBooleanPrefs[i].pref_name) {
SetLanguageConfigBoolean(kPinyinSectionName,
kPinyinBooleanPrefs[i].ibus_config_name,
language_pinyin_boolean_prefs_[i].GetValue());
}
}
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kPinyinIntegerPrefs); ++i) {
+ for (size_t i = 0; i < kNumPinyinIntegerPrefs; ++i) {
if (!pref_name || *pref_name == kPinyinIntegerPrefs[i].pref_name) {
SetLanguageConfigInteger(kPinyinSectionName,
kPinyinIntegerPrefs[i].ibus_config_name,
diff --git a/chrome/browser/chromeos/preferences.h b/chrome/browser/chromeos/preferences.h
index 94a0032..d674493 100644
--- a/chrome/browser/chromeos/preferences.h
+++ b/chrome/browser/chromeos/preferences.h
@@ -88,10 +88,8 @@ class Preferences : public NotificationObserver {
StringPrefMember language_hotkey_trigger_;
StringPrefMember language_preload_engines_;
StringPrefMember language_hangul_keyboard_;
- BooleanPrefMember language_pinyin_boolean_prefs_[
- ARRAYSIZE_UNSAFE(kPinyinBooleanPrefs)];
- IntegerPrefMember language_pinyin_int_prefs_[
- ARRAYSIZE_UNSAFE(kPinyinIntegerPrefs)];
+ BooleanPrefMember language_pinyin_boolean_prefs_[kNumPinyinBooleanPrefs];
+ IntegerPrefMember language_pinyin_int_prefs_[kNumPinyinIntegerPrefs];
DISALLOW_COPY_AND_ASSIGN(Preferences);
};
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index ac1a236..49bb392 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -844,6 +844,11 @@
'../build/linux/system.gyp:gtk'
],
}],
+ ['OS=="linux" and chromeos==1', {
+ 'include_dirs': [
+ '<(grit_out_dir)',
+ ],
+ }],
],
},
{
@@ -1005,6 +1010,11 @@
],
},
}],
+ ['OS=="linux" and chromeos==1', {
+ 'include_dirs': [
+ '<(grit_out_dir)',
+ ],
+ }],
['OS=="mac"', {
'link_settings': {
'libraries': [
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 0ee3460..86a6903 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -438,6 +438,8 @@
'browser/chromeos/options/language_config_view.h',
'browser/chromeos/options/language_hangul_config_view.cc',
'browser/chromeos/options/language_hangul_config_view.h',
+ 'browser/chromeos/options/language_pinyin_config_view.cc',
+ 'browser/chromeos/options/language_pinyin_config_view.h',
'browser/chromeos/options/network_config_view.cc',
'browser/chromeos/options/network_config_view.h',
'browser/chromeos/options/options_window_view.cc',