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

Unified Diff: chrome/browser/spellchecker/spellcheck_service.h

Issue 1156473007: Enables the user to select multiple languages for spellchecking (UI) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits and rebased. Created 5 years, 6 months 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
Index: chrome/browser/spellchecker/spellcheck_service.h
diff --git a/chrome/browser/spellchecker/spellcheck_service.h b/chrome/browser/spellchecker/spellcheck_service.h
index c7229e8b468b03a55676e5ad7ab141c84c5f89cb..6252aa4032676657ba2866880898fccc743b5e12 100644
--- a/chrome/browser/spellchecker/spellcheck_service.h
+++ b/chrome/browser/spellchecker/spellcheck_service.h
@@ -23,6 +23,7 @@ class SpellCheckHostMetrics;
namespace base {
class WaitableEvent;
+class SupportsUserData;
}
namespace content {
@@ -63,20 +64,13 @@ class SpellcheckService : public KeyedService,
base::WeakPtr<SpellcheckService> GetWeakPtr();
- // 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.
+ // Computes |languages| to display in the context menu over a text area for
+ // changing spellcheck languages. Returns the number of languages that are
+ // enabled, which are always at the beginning of |languages|.
// TODO(port): this should take a vector of base::string16, but the
// implementation has some dependencies in l10n util that need porting first.
- static int GetSpellCheckLanguages(content::BrowserContext* context,
- std::vector<std::string>* languages);
-
- // Computes a vector of strings which are to be displayed in the context
- // menu from |accept_languages| and |dictionary_language|.
- static void GetSpellCheckLanguagesFromAcceptLanguages(
- const std::vector<std::string>& accept_languages,
- const std::string& dictionary_language,
- std::vector<std::string>* languages);
+ static size_t GetSpellCheckLanguages(base::SupportsUserData* context,
+ std::vector<std::string>* languages);
// Signals the event attached by AttachTestEvent() to report the specified
// event to browser tests. This function is called by this class and its

Powered by Google App Engine
This is Rietveld 408576698