diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-19 22:44:29 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-19 22:44:29 +0000 |
commit | c27324bdb7b9ee448a0c73d5c005c709282c8cbc (patch) | |
tree | d7ec31ab43e6493ef3f00eb81faeca0c79a793c3 /chrome/browser/spellcheck_host.h | |
parent | 5ef3748a651d073bf12928e880a042bf450e1aa8 (diff) | |
download | chromium_src-c27324bdb7b9ee448a0c73d5c005c709282c8cbc.zip chromium_src-c27324bdb7b9ee448a0c73d5c005c709282c8cbc.tar.gz chromium_src-c27324bdb7b9ee448a0c73d5c005c709282c8cbc.tar.bz2 |
Move Mac to using renderer spellchecker.
BUG=25677
Review URL: http://codereview.chromium.org/395007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32561 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/spellcheck_host.h')
-rw-r--r-- | chrome/browser/spellcheck_host.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/chrome/browser/spellcheck_host.h b/chrome/browser/spellcheck_host.h index 6b25cd0..325921a 100644 --- a/chrome/browser/spellcheck_host.h +++ b/chrome/browser/spellcheck_host.h @@ -15,6 +15,8 @@ #include "chrome/browser/net/url_fetcher.h" #include "chrome/browser/net/url_request_context_getter.h" +class Profile; + class SpellCheckHost : public base::RefCountedThreadSafe<SpellCheckHost, ChromeThread::DeleteOnFileThread>, public URLFetcher::Delegate { @@ -37,6 +39,14 @@ class SpellCheckHost : public base::RefCountedThreadSafe<SpellCheckHost, // update. void AddWord(const std::string& word); + // 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 GetSpellCheckLanguages(Profile* profile, + std::vector<std::string>* languages); + const base::PlatformFile& bdict_file() const { return file_; } const std::vector<std::string>& custom_words() const { return custom_words_; } @@ -45,6 +55,8 @@ class SpellCheckHost : public base::RefCountedThreadSafe<SpellCheckHost, const std::string& language() const { return language_; } + bool use_platform_spellchecker() const { return use_platform_spellchecker_; } + private: // These two classes can destruct us. friend class ChromeThread; @@ -109,6 +121,9 @@ class SpellCheckHost : public base::RefCountedThreadSafe<SpellCheckHost, // once. bool tried_to_download_; + // Whether we should use the platform spellchecker instead of Hunspell. + bool use_platform_spellchecker_; + // Data received from the dictionary download. std::string data_; |