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 PrefService; |
| 12 |
11 namespace base { | 13 namespace base { |
12 class FilePath; | 14 class FilePath; |
13 } | 15 } |
14 | 16 |
15 namespace chrome { | 17 namespace chrome { |
16 namespace spellcheck_common { | 18 namespace spellcheck_common { |
17 | 19 |
18 // The number of hours that a session of feedback for spelling service lasts. | 20 // The number of hours that a session of feedback for spelling service lasts. |
19 // After this number of hours passes, all feedback. | 21 // After this number of hours passes, all feedback. |
20 static const int kSessionHours = 6; | 22 static const int kSessionHours = 6; |
(...skipping 27 matching lines...) Expand all Loading... |
48 void SpellCheckLanguages(std::vector<std::string>* languages); | 50 void SpellCheckLanguages(std::vector<std::string>* languages); |
49 | 51 |
50 // Gets the ISO codes for the language and country of this |locale|. The | 52 // Gets the ISO codes for the language and country of this |locale|. The |
51 // |locale| is an ISO locale ID that may not include a country ID, e.g., "fr" or | 53 // |locale| is an ISO locale ID that may not include a country ID, e.g., "fr" or |
52 // "de". This method converts the UI locale to a full locale ID and converts the | 54 // "de". This method converts the UI locale to a full locale ID and converts the |
53 // full locale ID to an ISO language code and an ISO3 country code. | 55 // full locale ID to an ISO language code and an ISO3 country code. |
54 void GetISOLanguageCountryCodeFromLocale(const std::string& locale, | 56 void GetISOLanguageCountryCodeFromLocale(const std::string& locale, |
55 std::string* language_code, | 57 std::string* language_code, |
56 std::string* country_code); | 58 std::string* country_code); |
57 | 59 |
| 60 // Returns the list of enabled spellcheck dictionaries. |
| 61 std::vector<std::string> GetDictionaryLanguagesPref(PrefService* prefs); |
| 62 |
58 // Returns true if multilingual spellchecker is enabled. | 63 // Returns true if multilingual spellchecker is enabled. |
59 bool IsMultilingualSpellcheckEnabled(); | 64 bool IsMultilingualSpellcheckEnabled(); |
60 | 65 |
61 } // namespace spellcheck_common | 66 } // namespace spellcheck_common |
62 } // namespace chrome | 67 } // namespace chrome |
63 | 68 |
64 #endif // CHROME_COMMON_SPELLCHECK_COMMON_H_ | 69 #endif // CHROME_COMMON_SPELLCHECK_COMMON_H_ |
OLD | NEW |