summaryrefslogtreecommitdiffstats
path: root/chrome/browser/spellchecker.h
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-09 21:16:05 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-09 21:16:05 +0000
commit98324891649cf5fa7430c2e231ad5493fdb76c8e (patch)
tree4c48f7d44d002691e717526bdb2d7870296b10df /chrome/browser/spellchecker.h
parent1edc999cee504ed756ee798dfb1bfd95f53b4262 (diff)
downloadchromium_src-98324891649cf5fa7430c2e231ad5493fdb76c8e.zip
chromium_src-98324891649cf5fa7430c2e231ad5493fdb76c8e.tar.gz
chromium_src-98324891649cf5fa7430c2e231ad5493fdb76c8e.tar.bz2
Adds support for the os x spelling panel to chromium. Users can
now access it from the main menu and context menu and use it to perform spelling tasks. For more detail, see http://code.google.com/p/chromium/wiki/SpellingPanelPlanningDoc Patch from pwicks86@gmail.com (Paul Wicks). BUG=None TEST=The spelling panel should work in os x. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25786 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/spellchecker.h')
-rw-r--r--chrome/browser/spellchecker.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/spellchecker.h b/chrome/browser/spellchecker.h
index fa1b156..48e4153 100644
--- a/chrome/browser/spellchecker.h
+++ b/chrome/browser/spellchecker.h
@@ -64,6 +64,8 @@ class SpellChecker : public base::RefCountedThreadSafe<SpellChecker>,
// SpellCheck a word.
// Returns true if spelled correctly, false otherwise.
// If the spellchecker failed to initialize, always returns true.
+ // The |tag| parameter should either be a unique identifier for the document
+ // that the word came from (if the current platform requires it), or 0.
// In addition, finds the suggested words for a given word
// and puts them into |*optional_suggestions|.
// If the word is spelled correctly, the vector is empty.
@@ -71,6 +73,7 @@ class SpellChecker : public base::RefCountedThreadSafe<SpellChecker>,
// Note that Doing suggest lookups can be slow.
bool SpellCheckWord(const wchar_t* in_word,
int in_word_len,
+ int tag,
int* misspelling_start,
int* misspelling_len,
std::vector<std::wstring>* optional_suggestions);
@@ -78,7 +81,7 @@ class SpellChecker : public base::RefCountedThreadSafe<SpellChecker>,
// Find a possible correctly spelled word for a misspelled word. Computes an
// empty string if input misspelled word is too long, there is ambiguity, or
// the correct spelling cannot be determined.
- void GetAutoCorrectionWord(const std::wstring& word,
+ void GetAutoCorrectionWord(const std::wstring& word, int tag,
std::wstring* autocorrect_word);
// Turn auto spell correct support ON or OFF.
@@ -124,7 +127,7 @@ class SpellChecker : public base::RefCountedThreadSafe<SpellChecker>,
// When called, relays the request to check the spelling to the proper
// backend, either hunspell or a platform-specific backend.
- bool CheckSpelling(const std::string& word_to_check);
+ bool CheckSpelling(const std::string& word_to_check, int tag);
// When called, relays the request to fill the list with suggestions to
// the proper backend, either hunspell or a platform-specific backend.
@@ -144,7 +147,7 @@ class SpellChecker : public base::RefCountedThreadSafe<SpellChecker>,
// Returns whether or not the given word is a contraction of valid words
// (e.g. "word:word").
- bool IsValidContraction(const string16& word);
+ bool IsValidContraction(const string16& word, int tag);
// Return the file name of the dictionary, including the path and the version
// numbers.