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 CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PLATFORM_H_ | 8 #ifndef CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PLATFORM_H_ |
9 #define CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PLATFORM_H_ | 9 #define CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PLATFORM_H_ |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // document can now be forgotten. | 87 // document can now be forgotten. |
88 void CloseDocumentWithTag(int tag); | 88 void CloseDocumentWithTag(int tag); |
89 | 89 |
90 // Requests an asyncronous spell and grammar checking. | 90 // Requests an asyncronous spell and grammar checking. |
91 // The result is returned to an IPC message to |destination| thus it should | 91 // The result is returned to an IPC message to |destination| thus it should |
92 // not be null. | 92 // not be null. |
93 void RequestTextCheck(int document_tag, | 93 void RequestTextCheck(int document_tag, |
94 const base::string16& text, | 94 const base::string16& text, |
95 TextCheckCompleteCallback callback); | 95 TextCheckCompleteCallback callback); |
96 | 96 |
| 97 //Initializes the Java class that will be used for Android spellchecking. |
| 98 void InitializeJNIBridge(); |
| 99 |
97 // Internal state, to restore system state after testing. | 100 // Internal state, to restore system state after testing. |
98 // Not public since it contains Cocoa data types. | 101 // Not public since it contains Cocoa data types. |
99 class SpellcheckerStateInternal; | 102 class SpellcheckerStateInternal; |
100 | 103 |
101 // Test helper, forces the system spellchecker to en-US for its lifetime. | 104 // Test helper, forces the system spellchecker to en-US for its lifetime. |
102 class ScopedEnglishLanguageForTest { | 105 class ScopedEnglishLanguageForTest { |
103 public: | 106 public: |
104 ScopedEnglishLanguageForTest(); | 107 ScopedEnglishLanguageForTest(); |
105 ~ScopedEnglishLanguageForTest(); | 108 ~ScopedEnglishLanguageForTest(); |
106 private: | 109 private: |
107 SpellcheckerStateInternal* state_; | 110 SpellcheckerStateInternal* state_; |
108 }; | 111 }; |
109 | 112 |
110 } // namespace spellcheck_platform | 113 } // namespace spellcheck_platform |
111 | 114 |
112 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PLATFORM_H_ | 115 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PLATFORM_H_ |
OLD | NEW |