| 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_COMMON_SPELLCHECK_COMMON_H_ | 5 #ifndef CHROME_COMMON_SPELLCHECK_COMMON_H_ |
| 6 #define CHROME_COMMON_SPELLCHECK_COMMON_H_ | 6 #define CHROME_COMMON_SPELLCHECK_COMMON_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 class FilePath; | 11 class FilePath; |
| 12 | 12 |
| 13 namespace chrome { | 13 namespace chrome { |
| 14 namespace spellcheck_common { | 14 namespace spellcheck_common { |
| 15 | 15 |
| 16 // Max number of dictionary suggestions. | 16 // Max number of dictionary suggestions. |
| 17 static const int kMaxSuggestions = 5; | 17 static const int kMaxSuggestions = 5; |
| 18 | 18 |
| 19 static const int kMaxAutoCorrectWordSize = 8; | 19 static const int kMaxAutoCorrectWordSize = 8; |
| 20 | 20 |
| 21 // Maximum number of words in the custom spellcheck dictionary that can be |
| 22 // synced. |
| 23 static const size_t MAX_SYNCABLE_DICTIONARY_WORDS = 1300; |
| 24 |
| 25 // Maximum number of bytes in a word that can be added to the custom spellcheck |
| 26 // dictionary. |
| 27 static const size_t MAX_CUSTOM_DICTIONARY_WORD_BYTES = 99; |
| 28 |
| 21 typedef std::vector<std::string> WordList; | 29 typedef std::vector<std::string> WordList; |
| 22 | 30 |
| 23 FilePath GetVersionedFileName(const std::string& input_language, | 31 FilePath GetVersionedFileName(const std::string& input_language, |
| 24 const FilePath& dict_dir); | 32 const FilePath& dict_dir); |
| 25 | 33 |
| 26 std::string GetCorrespondingSpellCheckLanguage(const std::string& language); | 34 std::string GetCorrespondingSpellCheckLanguage(const std::string& language); |
| 27 | 35 |
| 28 // Get SpellChecker supported languages. | 36 // Get SpellChecker supported languages. |
| 29 void SpellCheckLanguages(std::vector<std::string>* languages); | 37 void SpellCheckLanguages(std::vector<std::string>* languages); |
| 30 | 38 |
| 31 } // namespace spellcheck_common | 39 } // namespace spellcheck_common |
| 32 } // namespace chrome | 40 } // namespace chrome |
| 33 | 41 |
| 34 #endif // CHROME_COMMON_SPELLCHECK_COMMON_H_ | 42 #endif // CHROME_COMMON_SPELLCHECK_COMMON_H_ |
| OLD | NEW |