diff options
author | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-17 15:06:48 +0000 |
---|---|---|
committer | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-17 15:06:48 +0000 |
commit | dba6d2c192dcbe1bcede9c7992e6b1e552faa2b8 (patch) | |
tree | 6e9f87df55fb585777af1081b38414b3e2c9da1f /chrome/browser/spellchecker.cc | |
parent | 0329a07182f593bcbb9ba29f97b89eb64359b18b (diff) | |
download | chromium_src-dba6d2c192dcbe1bcede9c7992e6b1e552faa2b8.zip chromium_src-dba6d2c192dcbe1bcede9c7992e6b1e552faa2b8.tar.gz chromium_src-dba6d2c192dcbe1bcede9c7992e6b1e552faa2b8.tar.bz2 |
Adds languages supported by the platform spellchecker to the right
click menu. Also includes a couple of methods which will be needed
once support for the spelling panel is finished. Patch from Paul Wicks
(pwicks86@gmail.com)
BUG=NONE
TEST=Context menu on the mac should show and allow switching between languages
for the spellchecker
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20951 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/spellchecker.cc')
-rw-r--r-- | chrome/browser/spellchecker.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/spellchecker.cc b/chrome/browser/spellchecker.cc index 7abab66..cbc0f7a 100644 --- a/chrome/browser/spellchecker.cc +++ b/chrome/browser/spellchecker.cc @@ -172,8 +172,13 @@ int SpellChecker::GetSpellCheckLanguages( // Now scan through the list of accept languages, and find possible mappings // from this list to the existing list of spell check languages. std::vector<std::string> accept_languages; - SplitString(WideToASCII(accept_languages_pref.GetValue()), ',', - &accept_languages); + + if (SpellCheckerPlatform::SpellCheckerAvailable()) { + SpellCheckerPlatform::GetAvailableLanguages(&accept_languages); + } else { + SplitString(WideToASCII(accept_languages_pref.GetValue()), ',', + &accept_languages); + } for (std::vector<std::string>::const_iterator i = accept_languages.begin(); i != accept_languages.end(); ++i) { std::string language = GetCorrespondingSpellCheckLanguage(*i); |