summaryrefslogtreecommitdiffstats
path: root/chrome/browser/spellchecker.h
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-11 00:34:12 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-11 00:34:12 +0000
commit74c8b421637393234e24b227929b89eba0883e76 (patch)
tree4d24222844a03a330142eb3210604cc4b67c4c4a /chrome/browser/spellchecker.h
parent3b166f49b912091f6e45e500d1617fd7609b6fe1 (diff)
downloadchromium_src-74c8b421637393234e24b227929b89eba0883e76.zip
chromium_src-74c8b421637393234e24b227929b89eba0883e76.tar.gz
chromium_src-74c8b421637393234e24b227929b89eba0883e76.tar.bz2
Change SpellChecker::Language to be an ASCII string.
Review URL: http://codereview.chromium.org/41028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11407 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/spellchecker.h')
-rw-r--r--chrome/browser/spellchecker.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/chrome/browser/spellchecker.h b/chrome/browser/spellchecker.h
index ede737a..7b8e72b 100644
--- a/chrome/browser/spellchecker.h
+++ b/chrome/browser/spellchecker.h
@@ -41,8 +41,13 @@ class MemoryMappedFile;
// deleted on the I/O thread itself.
class SpellChecker : public base::RefCountedThreadSafe<SpellChecker> {
public:
- typedef std::wstring Language;
- typedef std::vector<Language> Languages;
+ // ASCII string representing a language and/or region, e.g. "en-US".
+ typedef std::string Language;
+ typedef std::vector<Language> Languages;
+ // Languages that are suitable for display to the user.
+ // TODO(port): this should be string16, but we need to port
+ // l10n_util::SortStrings to string16 first.
+ typedef std::vector<std::wstring> DisplayLanguages;
// Creates the spellchecker by reading dictionaries from the given directory,
// and defaulting to the given language. Both strings must be provided.
@@ -85,9 +90,11 @@ class SpellChecker : public base::RefCountedThreadSafe<SpellChecker> {
// This function computes a vector of strings which are to be displayed in
// the context menu over a text area for changing spell check languages. It
// returns the index of the current spell check language in the vector.
+ // TODO(port): this should take a vector of string16, but the implementation
+ // has some dependencies in l10n util that need porting first.
static int GetSpellCheckLanguagesToDisplayInContextMenu(
Profile* profile,
- Languages* display_languages);
+ DisplayLanguages* display_languages);
// This function returns the corresponding language-region code for the
// spell check language. For example, for hi, it returns hi-IN.