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