| 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_SIZE_IN_WORDS = 1300; |
| 24 |
| 21 typedef std::vector<std::string> WordList; | 25 typedef std::vector<std::string> WordList; |
| 22 | 26 |
| 23 FilePath GetVersionedFileName(const std::string& input_language, | 27 FilePath GetVersionedFileName(const std::string& input_language, |
| 24 const FilePath& dict_dir); | 28 const FilePath& dict_dir); |
| 25 | 29 |
| 26 std::string GetCorrespondingSpellCheckLanguage(const std::string& language); | 30 std::string GetCorrespondingSpellCheckLanguage(const std::string& language); |
| 27 | 31 |
| 28 // Get SpellChecker supported languages. | 32 // Get SpellChecker supported languages. |
| 29 void SpellCheckLanguages(std::vector<std::string>* languages); | 33 void SpellCheckLanguages(std::vector<std::string>* languages); |
| 30 | 34 |
| 31 } // namespace spellcheck_common | 35 } // namespace spellcheck_common |
| 32 } // namespace chrome | 36 } // namespace chrome |
| 33 | 37 |
| 34 #endif // CHROME_COMMON_SPELLCHECK_COMMON_H_ | 38 #endif // CHROME_COMMON_SPELLCHECK_COMMON_H_ |
| OLD | NEW |