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

Unified Diff: chrome/browser/spellcheck_worditerator.h

Issue 14408: Port the spell checker to posix. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years 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/spellcheck_worditerator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/spellcheck_worditerator.h
===================================================================
--- chrome/browser/spellcheck_worditerator.h (revision 6919)
+++ chrome/browser/spellcheck_worditerator.h (working copy)
@@ -9,6 +9,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/string16.h"
#include "unicode/uscript.h"
@@ -93,7 +94,7 @@
// * attribute [in] (const SpellcheckCharAttribute*)
// Represents a set of character attributes used for filtering out
// non-word characters.
- // * word [in] (const wchar_t*)
+ // * word [in] (const char16*)
// Represents a string from which this object extracts words.
// (This string does not have to be NUL-terminated.)
// * length [in] (size_t)
@@ -108,20 +109,20 @@
// * false
// An error occured while initializing this object.
void Initialize(const SpellcheckCharAttribute* attribute,
- const wchar_t* word,
+ const char16* word,
size_t length,
bool allow_contraction);
// Retrieves a word (or a contraction).
// Parameters
- // * word_string [out] (std::wstring*)
+ // * word_string [out] (string16*)
// Represents a word (or a contraction) to be checked its spelling.
// This |word_string| has been already normalized to its canonical form
// (i.e. decomposed ligatures, replaced full-width latin characters to
// its ASCII alternatives, etc.) so that a SpellChecker object can check
// its spelling without any additional operations.
// On the other hand, a substring of the input string
- // std::wstring str(&word[word_start], word_length);
+ // string16 str(&word[word_start], word_length);
// represents the non-normalized version of this extracted word.
// * word_start [out] (int*)
// Represents the offset of this word from the beginning of the input
@@ -136,7 +137,7 @@
// Found a word (or a contraction) to be checked its spelling.
// * false
// Not found any more words or contractions to be checked their spellings.
- bool GetNextWord(std::wstring* word_string,
+ bool GetNextWord(string16* word_string,
int* word_start,
int* word_length);
@@ -157,11 +158,11 @@
// canonical form to the |output_string|.
bool Normalize(int input_start,
int input_length,
- std::wstring* output_string) const;
+ string16* output_string) const;
private:
// The pointer to the input string from which we are extracting words.
- const wchar_t* word_;
+ const char16* word_;
// The length of the original string.
int length_;
« no previous file with comments | « chrome/browser/spellcheck_unittest.cc ('k') | chrome/browser/spellcheck_worditerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698