OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This file defines the interface that any platform-specific spellchecker | 5 // This file defines the interface that any platform-specific spellchecker |
6 // needs to implement in order to be used by the browser. | 6 // needs to implement in order to be used by the browser. |
7 | 7 |
8 #ifndef COMPONENTS_SPELLCHECK_BROWSER_SPELLCHECK_PLATFORM_H_ | 8 #ifndef COMPONENTS_SPELLCHECK_BROWSER_SPELLCHECK_PLATFORM_H_ |
9 #define COMPONENTS_SPELLCHECK_BROWSER_SPELLCHECK_PLATFORM_H_ | 9 #define COMPONENTS_SPELLCHECK_BROWSER_SPELLCHECK_PLATFORM_H_ |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/callback_forward.h" | 14 #include "base/callback_forward.h" |
15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
16 | 16 |
17 struct SpellCheckResult; | 17 struct SpellCheckResult; |
18 | 18 |
19 namespace content { | |
20 class BrowserMessageFilter; | |
21 } // namespace content | |
22 | |
23 namespace spellcheck_platform { | 19 namespace spellcheck_platform { |
24 | 20 |
25 typedef base::Callback<void( | 21 typedef base::Callback<void( |
26 const std::vector<SpellCheckResult>& /* results */)> | 22 const std::vector<SpellCheckResult>& /* results */)> |
27 TextCheckCompleteCallback; | 23 TextCheckCompleteCallback; |
28 | 24 |
29 // Get the languages supported by the platform spellchecker and store them in | 25 // Get the languages supported by the platform spellchecker and store them in |
30 // |spellcheck_languages|. Note that they must be converted to | 26 // |spellcheck_languages|. Note that they must be converted to |
31 // Chromium style codes (en-US not en_US). See spellchecker.cc for a full list. | 27 // Chromium style codes (en-US not en_US). See spellchecker.cc for a full list. |
32 void GetAvailableLanguages(std::vector<std::string>* spellcheck_languages); | 28 void GetAvailableLanguages(std::vector<std::string>* spellcheck_languages); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 public: | 102 public: |
107 ScopedEnglishLanguageForTest(); | 103 ScopedEnglishLanguageForTest(); |
108 ~ScopedEnglishLanguageForTest(); | 104 ~ScopedEnglishLanguageForTest(); |
109 private: | 105 private: |
110 SpellcheckerStateInternal* state_; | 106 SpellcheckerStateInternal* state_; |
111 }; | 107 }; |
112 | 108 |
113 } // namespace spellcheck_platform | 109 } // namespace spellcheck_platform |
114 | 110 |
115 #endif // COMPONENTS_SPELLCHECK_BROWSER_SPELLCHECK_PLATFORM_H_ | 111 #endif // COMPONENTS_SPELLCHECK_BROWSER_SPELLCHECK_PLATFORM_H_ |
OLD | NEW |