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

Side by Side Diff: chrome/renderer/spellchecker/spellcheck.h

Issue 1300213002: Offers suggestions for each language that marks a word misspelled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@multi-spellcheck
Patch Set: Fixed final nits. Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/renderer/spellchecker/spellcheck.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 |kMaxSuggestions|
125 // suggestions from |suggestions_list|. suggestions_list[i][j] is the j-th
126 // suggestion from the i-th language's suggestions. |optional_suggestions|
127 // cannot be null.
128 static void FillSuggestions(
129 const std::vector<std::vector<base::string16>>& suggestions_list,
130 std::vector<base::string16>* optional_suggestions);
131
124 // RenderProcessObserver implementation: 132 // RenderProcessObserver implementation:
125 bool OnControlMessageReceived(const IPC::Message& message) override; 133 bool OnControlMessageReceived(const IPC::Message& message) override;
126 134
127 // Message handlers. 135 // Message handlers.
128 void OnInit(const std::vector<SpellCheckBDictLanguage>& bdict_languages, 136 void OnInit(const std::vector<SpellCheckBDictLanguage>& bdict_languages,
129 const std::set<std::string>& custom_words, 137 const std::set<std::string>& custom_words,
130 bool auto_spell_correct); 138 bool auto_spell_correct);
131 void OnCustomDictionaryChanged(const std::set<std::string>& words_added, 139 void OnCustomDictionaryChanged(const std::set<std::string>& words_added,
132 const std::set<std::string>& words_removed); 140 const std::set<std::string>& words_removed);
133 void OnEnableAutoSpellCorrect(bool enable); 141 void OnEnableAutoSpellCorrect(bool enable);
(...skipping 26 matching lines...) Expand all
160 // Remember state for auto spell correct. 168 // Remember state for auto spell correct.
161 bool auto_spell_correct_turned_on_; 169 bool auto_spell_correct_turned_on_;
162 170
163 // Remember state for spellchecking. 171 // Remember state for spellchecking.
164 bool spellcheck_enabled_; 172 bool spellcheck_enabled_;
165 173
166 DISALLOW_COPY_AND_ASSIGN(SpellCheck); 174 DISALLOW_COPY_AND_ASSIGN(SpellCheck);
167 }; 175 };
168 176
169 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ 177 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/spellchecker/spellcheck.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698