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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
143 void PerformSpellCheck(SpellcheckRequest* request); | 143 void PerformSpellCheck(SpellcheckRequest* request); |
144 | 144 |
145 // The parameters of a pending background-spellchecking request. When WebKit | 145 // The parameters of a pending background-spellchecking request. When WebKit |
146 // sends a background-spellchecking request before initializing hunspell, | 146 // sends a background-spellchecking request before initializing hunspell, |
147 // we save its parameters and start spellchecking after we finish initializing | 147 // we save its parameters and start spellchecking after we finish initializing |
148 // hunspell. (When WebKit sends two or more requests, we cancel the previous | 148 // hunspell. (When WebKit sends two or more requests, we cancel the previous |
149 // requests so we do not have to use vectors.) | 149 // requests so we do not have to use vectors.) |
150 scoped_ptr<SpellcheckRequest> pending_request_param_; | 150 scoped_ptr<SpellcheckRequest> pending_request_param_; |
151 #endif | 151 #endif |
152 | 152 |
153 // Evenly fill |optional_suggestions| with suggestions from | |
154 // |suggestions_list|. | |
please use gerrit instead
2015/08/20 18:40:23
Specify the max size of optional suggestions.
Spe
Julius
2015/08/20 21:52:51
Done.
| |
155 void FillSuggestions( | |
156 std::vector<std::vector<base::string16>>& suggestions_list, | |
157 std::vector<base::string16>* optional_suggestions); | |
158 | |
153 // A vector of objects used to actually check spelling, one for each enabled | 159 // A vector of objects used to actually check spelling, one for each enabled |
154 // language. | 160 // language. |
155 ScopedVector<SpellcheckLanguage> languages_; | 161 ScopedVector<SpellcheckLanguage> languages_; |
156 | 162 |
157 // Custom dictionary spelling engine. | 163 // Custom dictionary spelling engine. |
158 CustomDictionaryEngine custom_dictionary_; | 164 CustomDictionaryEngine custom_dictionary_; |
159 | 165 |
160 // Remember state for auto spell correct. | 166 // Remember state for auto spell correct. |
161 bool auto_spell_correct_turned_on_; | 167 bool auto_spell_correct_turned_on_; |
162 | 168 |
163 // Remember state for spellchecking. | 169 // Remember state for spellchecking. |
164 bool spellcheck_enabled_; | 170 bool spellcheck_enabled_; |
165 | 171 |
166 DISALLOW_COPY_AND_ASSIGN(SpellCheck); | 172 DISALLOW_COPY_AND_ASSIGN(SpellCheck); |
167 }; | 173 }; |
168 | 174 |
169 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ | 175 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ |
OLD | NEW |