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

Side by Side Diff: chrome/common/spellcheck_common.h

Issue 15940004: Add HasWord(string) method to SpellcheckCustomDictionary (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Clarified message direction (browser-to-renderer) in spellcheck_messages.h Created 7 years, 6 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
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_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 <set>
8 #include <string> 9 #include <string>
9 #include <vector> 10 #include <vector>
10 11
11 namespace base { 12 namespace base {
12 class FilePath; 13 class FilePath;
13 } 14 }
14 15
15 namespace chrome { 16 namespace chrome {
16 namespace spellcheck_common { 17 namespace spellcheck_common {
17 18
(...skipping 15 matching lines...) Expand all
33 34
34 // Maximum number of words in the custom spellcheck dictionary that can be 35 // Maximum number of words in the custom spellcheck dictionary that can be
35 // synced. 36 // synced.
36 static const size_t MAX_SYNCABLE_DICTIONARY_WORDS = 1300; 37 static const size_t MAX_SYNCABLE_DICTIONARY_WORDS = 1300;
37 38
38 // Maximum number of bytes in a word that can be added to the custom spellcheck 39 // Maximum number of bytes in a word that can be added to the custom spellcheck
39 // dictionary. 40 // dictionary.
40 static const size_t MAX_CUSTOM_DICTIONARY_WORD_BYTES = 99; 41 static const size_t MAX_CUSTOM_DICTIONARY_WORD_BYTES = 99;
41 42
42 typedef std::vector<std::string> WordList; 43 typedef std::vector<std::string> WordList;
44 typedef std::set<std::string> WordSet;
43 45
44 base::FilePath GetVersionedFileName(const std::string& input_language, 46 base::FilePath GetVersionedFileName(const std::string& input_language,
45 const base::FilePath& dict_dir); 47 const base::FilePath& dict_dir);
46 48
47 std::string GetCorrespondingSpellCheckLanguage(const std::string& language); 49 std::string GetCorrespondingSpellCheckLanguage(const std::string& language);
48 50
49 // Get SpellChecker supported languages. 51 // Get SpellChecker supported languages.
50 void SpellCheckLanguages(std::vector<std::string>* languages); 52 void SpellCheckLanguages(std::vector<std::string>* languages);
51 53
52 // Gets the ISO codes for the language and country of this |locale|. The 54 // Gets the ISO codes for the language and country of this |locale|. The
53 // |locale| is an ISO locale ID that may not include a country ID, e.g., "fr" or 55 // |locale| is an ISO locale ID that may not include a country ID, e.g., "fr" or
54 // "de". This method converts the UI locale to a full locale ID and converts the 56 // "de". This method converts the UI locale to a full locale ID and converts the
55 // full locale ID to an ISO language code and an ISO3 country code. 57 // full locale ID to an ISO language code and an ISO3 country code.
56 void GetISOLanguageCountryCodeFromLocale(const std::string& locale, 58 void GetISOLanguageCountryCodeFromLocale(const std::string& locale,
57 std::string* language_code, 59 std::string* language_code,
58 std::string* country_code); 60 std::string* country_code);
59 61
60 } // namespace spellcheck_common 62 } // namespace spellcheck_common
61 } // namespace chrome 63 } // namespace chrome
62 64
63 #endif // CHROME_COMMON_SPELLCHECK_COMMON_H_ 65 #endif // CHROME_COMMON_SPELLCHECK_COMMON_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/language_dictionary_overlay_handler.cc ('k') | chrome/common/spellcheck_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698