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

Unified Diff: chrome/browser/spellchecker.h

Issue 160565: Adds support for the os x spelling panel to chromium. Users can... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 3 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
« no previous file with comments | « chrome/browser/spellcheck_unittest.cc ('k') | chrome/browser/spellchecker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/spellchecker.h
===================================================================
--- chrome/browser/spellchecker.h (revision 25643)
+++ chrome/browser/spellchecker.h (working copy)
@@ -64,6 +64,8 @@
// 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 @@
// 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 @@
// 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 @@
// 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 @@
// 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.
« no previous file with comments | « chrome/browser/spellcheck_unittest.cc ('k') | chrome/browser/spellchecker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698