Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7578)

Unified Diff: chrome/browser/spellcheck_host.h

Issue 395007: Move Mac to using renderer spellchecker. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: ui test fix Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/renderer_host/resource_message_filter.cc ('k') | chrome/browser/spellcheck_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/spellcheck_host.h
===================================================================
--- chrome/browser/spellcheck_host.h (revision 32394)
+++ chrome/browser/spellcheck_host.h (working copy)
@@ -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 @@
// 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 @@
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 @@
// 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_;
« no previous file with comments | « chrome/browser/renderer_host/resource_message_filter.cc ('k') | chrome/browser/spellcheck_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698