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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
114 blink::WebVector<blink::WebTextCheckingResult>* textcheck_results); | 114 blink::WebVector<blink::WebTextCheckingResult>* textcheck_results); |
115 | 115 |
116 bool IsSpellcheckEnabled(); | 116 bool IsSpellcheckEnabled(); |
117 | 117 |
118 private: | 118 private: |
119 friend class SpellCheckTest; | 119 friend class SpellCheckTest; |
120 FRIEND_TEST_ALL_PREFIXES(SpellCheckTest, GetAutoCorrectionWord_EN_US); | 120 FRIEND_TEST_ALL_PREFIXES(SpellCheckTest, GetAutoCorrectionWord_EN_US); |
121 FRIEND_TEST_ALL_PREFIXES(SpellCheckTest, | 121 FRIEND_TEST_ALL_PREFIXES(SpellCheckTest, |
122 RequestSpellCheckMultipleTimesWithoutInitialization); | 122 RequestSpellCheckMultipleTimesWithoutInitialization); |
123 | 123 |
124 // Evenly fill |optional_suggestions| with a maximum of 5 suggestions from | |
please use gerrit instead
2015/08/20 22:14:27
Specify the constant name instead of 5. If we upda
Julius
2015/08/21 00:39:19
Done.
| |
125 // |suggestions_list|. suggestions_list[i][j] is the j-th suggestion from | |
126 // the i-th language's suggestions. |optional_suggestions| cannot be null. | |
127 static void FillSuggestions( | |
128 const std::vector<std::vector<base::string16>>& suggestions_list, | |
129 std::vector<base::string16>* optional_suggestions); | |
130 | |
124 // RenderProcessObserver implementation: | 131 // RenderProcessObserver implementation: |
125 bool OnControlMessageReceived(const IPC::Message& message) override; | 132 bool OnControlMessageReceived(const IPC::Message& message) override; |
126 | 133 |
127 // Message handlers. | 134 // Message handlers. |
128 void OnInit(const std::vector<SpellCheckBDictLanguage>& bdict_languages, | 135 void OnInit(const std::vector<SpellCheckBDictLanguage>& bdict_languages, |
129 const std::set<std::string>& custom_words, | 136 const std::set<std::string>& custom_words, |
130 bool auto_spell_correct); | 137 bool auto_spell_correct); |
131 void OnCustomDictionaryChanged(const std::set<std::string>& words_added, | 138 void OnCustomDictionaryChanged(const std::set<std::string>& words_added, |
132 const std::set<std::string>& words_removed); | 139 const std::set<std::string>& words_removed); |
133 void OnEnableAutoSpellCorrect(bool enable); | 140 void OnEnableAutoSpellCorrect(bool enable); |
(...skipping 26 matching lines...) Expand all Loading... | |
160 // Remember state for auto spell correct. | 167 // Remember state for auto spell correct. |
161 bool auto_spell_correct_turned_on_; | 168 bool auto_spell_correct_turned_on_; |
162 | 169 |
163 // Remember state for spellchecking. | 170 // Remember state for spellchecking. |
164 bool spellcheck_enabled_; | 171 bool spellcheck_enabled_; |
165 | 172 |
166 DISALLOW_COPY_AND_ASSIGN(SpellCheck); | 173 DISALLOW_COPY_AND_ASSIGN(SpellCheck); |
167 }; | 174 }; |
168 | 175 |
169 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ | 176 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ |
OLD | NEW |