summaryrefslogtreecommitdiffstats
path: root/chrome/browser/spellchecker_platform_engine.h
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-17 15:06:48 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-17 15:06:48 +0000
commitdba6d2c192dcbe1bcede9c7992e6b1e552faa2b8 (patch)
tree6e9f87df55fb585777af1081b38414b3e2c9da1f /chrome/browser/spellchecker_platform_engine.h
parent0329a07182f593bcbb9ba29f97b89eb64359b18b (diff)
downloadchromium_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_platform_engine.h')
-rw-r--r--chrome/browser/spellchecker_platform_engine.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/chrome/browser/spellchecker_platform_engine.h b/chrome/browser/spellchecker_platform_engine.h
index b73253a..ddfe64b 100644
--- a/chrome/browser/spellchecker_platform_engine.h
+++ b/chrome/browser/spellchecker_platform_engine.h
@@ -14,8 +14,20 @@
#include "chrome/browser/spellchecker_common.h"
namespace SpellCheckerPlatform {
-// Returns true if there is an platform-specific spellchecker.
+// Get the languages supported by the platform spellchecker and store them in
+// |spellcheck_languages|. Note that they must be converted to
+// Chromium style codes (en-US not en_US). See spellchecker.cc for a full list.
+void GetAvailableLanguages(std::vector<std::string>* spellcheck_languages);
+
+// Returns true if there is a platform-specific spellchecker that can be used.
bool SpellCheckerAvailable();
+
+// Returns true if the platform spellchecker has a spelling panel.
+bool SpellCheckerProvidesPanel();
+
+// Returns true if the platform spellchecker panel is visible.
+bool SpellCheckerPanelVisible();
+
// Do any initialization needed for spellchecker.
void Init();
// TODO(pwicks): should we add a companion to this, TearDown or something?
@@ -25,18 +37,23 @@ void Init();
// supports. If the platform-specific spellchecker supports the language,
// then returns true, otherwise false.
bool PlatformSupportsLanguage(const std::string& current_language);
+
// Sets the language for the platform-specific spellchecker.
void SetLanguage(const std::string& lang_to_set);
+
// Checks the spelling of the given string, using the platform-specific
// spellchecker. Returns true if the word is spelled correctly.
bool CheckSpelling(const std::string& word_to_check);
+
// Fills the given vector |optional_suggestions| with a number (up to
// kMaxSuggestions, which is defined in spellchecker_common.h) of suggestions
// for the string |wrong_word|.
void FillSuggestionList(const std::string& wrong_word,
std::vector<std::wstring>* optional_suggestions);
+
// Adds the given word to the platform dictionary.
void AddWord(const std::wstring& word);
+
// Remove a given word from the platform dictionary.
void RemoveWord(const std::wstring& word);
}