diff options
author | dylanking <dylanking@google.com> | 2015-07-07 22:12:36 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-08 05:13:06 +0000 |
commit | d7c49895dd01ef9777adfb443c61ea5eaf32bbd6 (patch) | |
tree | 133366dbdba3a677344c15c8396e7e14d2d40804 | |
parent | 6e9859f62e4d600ef63b42cc46802dbe9e7c8d2a (diff) | |
download | chromium_src-d7c49895dd01ef9777adfb443c61ea5eaf32bbd6.zip chromium_src-d7c49895dd01ef9777adfb443c61ea5eaf32bbd6.tar.gz chromium_src-d7c49895dd01ef9777adfb443c61ea5eaf32bbd6.tar.bz2 |
Added a Chrome flag to enable Android spellchecker.
Also enabled spellchecker libraries for Android.
BUG=415302
Review URL: https://codereview.chromium.org/1216073013
Cr-Commit-Position: refs/heads/master@{#337770}
-rw-r--r-- | chrome/android/java/src/org/chromium/chrome/browser/ChromeSwitches.java | 6 | ||||
-rw-r--r-- | chrome/app/generated_resources.grd | 5 | ||||
-rw-r--r-- | chrome/browser/about_flags.cc | 7 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 5 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 3 |
5 files changed, 26 insertions, 0 deletions
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeSwitches.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeSwitches.java index 064c03b..7c85f16 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeSwitches.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeSwitches.java @@ -162,6 +162,12 @@ public abstract class ChromeSwitches { */ public static final String DISABLE_DOMAIN_RELIABILITY = "disable-domain-reliability"; + /** + * Enable use of native Android spellchecker. + * Native switch - switches::kEnableAndroidSpellChecker + */ + public static final String ENABLE_ANDROID_SPELLCHECKER = "enable-android-spellchecker"; + // Prevent instantiation. private ChromeSwitches() {} } diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 0bd3330..3c8cd4d 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -12393,6 +12393,11 @@ The following application will be launched if you accept this request: <message name="IDS_OPTIONS_SETTINGS_LANGUAGE_AND_INPUT_SETTINGS" desc="Button title for invoking the 'Language and input options' panel."> Language and input settings... </message> + <if expr="is_android"> + <message name="IDS_OPTIONS_ENABLE_ANDROID_SPELLCHECKER_DESCRIPTION" desc="The description for the flag to enable use of the Android spellchecker."> + Enables use of the Android spellchecker. + </message> + </if> <if expr="not is_macosx"> <message name="IDS_OPTIONS_ENABLE_SPELLCHECK" desc="The documentation string of the 'Enable spellcheck' option"> Enable spell checking diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index cb078a0..a5ad304 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc @@ -811,6 +811,13 @@ const Experiment kExperiments[] = { kOsDesktop, SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)}, #if defined(ENABLE_SPELLCHECK) +#if defined(OS_ANDROID) + {"enable-android-spellchecker", + IDS_OPTIONS_ENABLE_SPELLCHECK, + IDS_OPTIONS_ENABLE_ANDROID_SPELLCHECKER_DESCRIPTION, + kOsAndroid, + SINGLE_VALUE_TYPE(switches::kEnableAndroidSpellChecker)}, +#endif {"spellcheck-autocorrect", IDS_FLAGS_SPELLCHECK_AUTOCORRECT, IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION, diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index c3d1f9f..b53a1a9 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -995,6 +995,11 @@ const char kSpeculativeResourcePrefetchingLearning[] = "learning"; const char kSpeculativeResourcePrefetchingEnabled[] = "enabled"; #if defined(ENABLE_SPELLCHECK) +#if defined(OS_ANDROID) +// Enables use of the Android spellchecker. +const char kEnableAndroidSpellChecker[] = "enable-android-spellchecker"; +#endif + // Enables the multilingual spellchecker. const char kEnableMultilingualSpellChecker[] = "enable-multilingual-spellchecker"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index ecda328..16206e3 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -273,6 +273,9 @@ extern const char kSpeculativeResourcePrefetchingDisabled[]; extern const char kSpeculativeResourcePrefetchingEnabled[]; extern const char kSpeculativeResourcePrefetchingLearning[]; #if defined(ENABLE_SPELLCHECK) +#if defined(OS_ANDROID) +extern const char kEnableAndroidSpellChecker[]; +#endif extern const char kEnableMultilingualSpellChecker[]; extern const char kEnableSpellingAutoCorrect[]; extern const char kEnableSpellingFeedbackFieldTrial[]; |