OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PLATFORM_MAC_H_ | 8 #ifndef CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PLATFORM_H_ |
9 #define CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PLATFORM_MAC_H_ | 9 #define CHROME_BROWSER_SPELLCHECKER_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 { | 19 namespace content { |
20 class BrowserMessageFilter; | 20 class BrowserMessageFilter; |
21 } // namespace content | 21 } // namespace content |
22 | 22 |
23 namespace spellcheck_mac { | 23 namespace spellcheck_platform { |
24 | 24 |
25 typedef base::Callback<void( | 25 typedef base::Callback<void( |
26 const std::vector<SpellCheckResult>& /* results */)> | 26 const std::vector<SpellCheckResult>& /* results */)> |
27 TextCheckCompleteCallback; | 27 TextCheckCompleteCallback; |
28 | 28 |
29 // Get the languages supported by the platform spellchecker and store them in | 29 // Get the languages supported by the platform spellchecker and store them in |
30 // |spellcheck_languages|. Note that they must be converted to | 30 // |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. | 31 // Chromium style codes (en-US not en_US). See spellchecker.cc for a full list. |
32 void GetAvailableLanguages(std::vector<std::string>* spellcheck_languages); | 32 void GetAvailableLanguages(std::vector<std::string>* spellcheck_languages); |
33 | 33 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
100 | 100 |
101 // Test helper, forces the system spellchecker to en-US for its lifetime. | 101 // Test helper, forces the system spellchecker to en-US for its lifetime. |
102 class ScopedEnglishLanguageForTest { | 102 class ScopedEnglishLanguageForTest { |
103 public: | 103 public: |
104 ScopedEnglishLanguageForTest(); | 104 ScopedEnglishLanguageForTest(); |
105 ~ScopedEnglishLanguageForTest(); | 105 ~ScopedEnglishLanguageForTest(); |
106 private: | 106 private: |
107 SpellcheckerStateInternal* state_; | 107 SpellcheckerStateInternal* state_; |
108 }; | 108 }; |
109 | 109 |
110 } // namespace spellcheck_mac | 110 } // namespace spellcheck_platform |
111 | 111 |
112 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PLATFORM_MAC_H_ | 112 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PLATFORM_H_ |
please use gerrit instead
2015/07/09 19:45:32
Please delete spellcheck_platform_mac.h in the sam
| |
OLD | NEW |