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_RENDERER_SPELLCHECKER_SPELLCHECK_LANGUAGE_H_ | 5 #ifndef CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_LANGUAGE_H_ |
6 #define CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_LANGUAGE_H_ | 6 #define CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_LANGUAGE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <queue> | 9 #include <queue> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/files/file.h" | 13 #include "base/files/file.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
16 #include "chrome/renderer/spellchecker/spellcheck_worditerator.h" | 16 #include "components/spellcheck/renderer/spellcheck_worditerator.h" |
17 | 17 |
18 class SpellingEngine; | 18 class SpellingEngine; |
19 | 19 |
20 class SpellcheckLanguage { | 20 class SpellcheckLanguage { |
21 public: | 21 public: |
22 enum SpellcheckWordResult { | 22 enum SpellcheckWordResult { |
23 // Denotes that every recognized word is spelled correctly, from the point | 23 // Denotes that every recognized word is spelled correctly, from the point |
24 // of spellchecking to the end of the text. | 24 // of spellchecking to the end of the text. |
25 IS_CORRECT, | 25 IS_CORRECT, |
26 // A sequence of skippable characters, such as punctuation, spaces, or | 26 // A sequence of skippable characters, such as punctuation, spaces, or |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 SpellcheckWordIterator contraction_iterator_; | 90 SpellcheckWordIterator contraction_iterator_; |
91 | 91 |
92 // Pointer to a platform-specific spelling engine, if it is in use. This | 92 // Pointer to a platform-specific spelling engine, if it is in use. This |
93 // should only be set if hunspell is not used. (I.e. on OSX, for now) | 93 // should only be set if hunspell is not used. (I.e. on OSX, for now) |
94 std::unique_ptr<SpellingEngine> platform_spelling_engine_; | 94 std::unique_ptr<SpellingEngine> platform_spelling_engine_; |
95 | 95 |
96 DISALLOW_COPY_AND_ASSIGN(SpellcheckLanguage); | 96 DISALLOW_COPY_AND_ASSIGN(SpellcheckLanguage); |
97 }; | 97 }; |
98 | 98 |
99 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_LANGUAGE_H_ | 99 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_LANGUAGE_H_ |
OLD | NEW |