OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ | 5 #ifndef CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ |
6 #define CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ | 6 #define CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // SpellCheck a word. | 59 // SpellCheck a word. |
60 // Returns true if spelled correctly, false otherwise. | 60 // Returns true if spelled correctly, false otherwise. |
61 // If the spellchecker failed to initialize, always returns true. | 61 // If the spellchecker failed to initialize, always returns true. |
62 // The |tag| parameter should either be a unique identifier for the document | 62 // The |tag| parameter should either be a unique identifier for the document |
63 // that the word came from (if the current platform requires it), or 0. | 63 // that the word came from (if the current platform requires it), or 0. |
64 // In addition, finds the suggested words for a given word | 64 // In addition, finds the suggested words for a given word |
65 // and puts them into |*optional_suggestions|. | 65 // and puts them into |*optional_suggestions|. |
66 // If the word is spelled correctly, the vector is empty. | 66 // If the word is spelled correctly, the vector is empty. |
67 // If optional_suggestions is NULL, suggested words will not be looked up. | 67 // If optional_suggestions is NULL, suggested words will not be looked up. |
68 // Note that Doing suggest lookups can be slow. | 68 // Note that Doing suggest lookups can be slow. |
69 bool SpellCheckWord(const char16* in_word, | 69 bool SpellCheckWord(const base::char16* in_word, |
70 int in_word_len, | 70 int in_word_len, |
71 int tag, | 71 int tag, |
72 int* misspelling_start, | 72 int* misspelling_start, |
73 int* misspelling_len, | 73 int* misspelling_len, |
74 std::vector<base::string16>* optional_suggestions); | 74 std::vector<base::string16>* optional_suggestions); |
75 | 75 |
76 // SpellCheck a paragraph. | 76 // SpellCheck a paragraph. |
77 // Returns true if |text| is correctly spelled, false otherwise. | 77 // Returns true if |text| is correctly spelled, false otherwise. |
78 // If the spellchecker failed to initialize, always returns true. | 78 // If the spellchecker failed to initialize, always returns true. |
79 bool SpellCheckParagraph( | 79 bool SpellCheckParagraph( |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 // Remember state for auto spell correct. | 153 // Remember state for auto spell correct. |
154 bool auto_spell_correct_turned_on_; | 154 bool auto_spell_correct_turned_on_; |
155 | 155 |
156 // Remember state for spellchecking. | 156 // Remember state for spellchecking. |
157 bool spellcheck_enabled_; | 157 bool spellcheck_enabled_; |
158 | 158 |
159 DISALLOW_COPY_AND_ASSIGN(SpellCheck); | 159 DISALLOW_COPY_AND_ASSIGN(SpellCheck); |
160 }; | 160 }; |
161 | 161 |
162 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ | 162 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ |
OLD | NEW |