| 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_MAC_H_ | 8 #ifndef CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PLATFORM_MAC_H_ |
| 9 #define CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PLATFORM_MAC_H_ | 9 #define CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PLATFORM_MAC_H_ |
| 10 #pragma once | 10 #pragma once |
| 11 | 11 |
| 12 #include <string> | 12 #include <string> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/callback_forward.h" | 15 #include "base/callback_forward.h" |
| 16 #include "base/string16.h" | 16 #include "base/string16.h" |
| 17 | 17 |
| 18 namespace content { |
| 18 class BrowserMessageFilter; | 19 class BrowserMessageFilter; |
| 20 } // namespace content |
| 19 | 21 |
| 20 namespace spellcheck_mac { | 22 namespace spellcheck_mac { |
| 21 | 23 |
| 22 // Get the languages supported by the platform spellchecker and store them in | 24 // Get the languages supported by the platform spellchecker and store them in |
| 23 // |spellcheck_languages|. Note that they must be converted to | 25 // |spellcheck_languages|. Note that they must be converted to |
| 24 // Chromium style codes (en-US not en_US). See spellchecker.cc for a full list. | 26 // Chromium style codes (en-US not en_US). See spellchecker.cc for a full list. |
| 25 void GetAvailableLanguages(std::vector<std::string>* spellcheck_languages); | 27 void GetAvailableLanguages(std::vector<std::string>* spellcheck_languages); |
| 26 | 28 |
| 27 // Returns true if there is a platform-specific spellchecker that can be used. | 29 // Returns true if there is a platform-specific spellchecker that can be used. |
| 28 bool SpellCheckerAvailable(); | 30 bool SpellCheckerAvailable(); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // document can now be forgotten. | 82 // document can now be forgotten. |
| 81 void CloseDocumentWithTag(int tag); | 83 void CloseDocumentWithTag(int tag); |
| 82 | 84 |
| 83 // Requests an asyncronous spell and grammar checking. | 85 // Requests an asyncronous spell and grammar checking. |
| 84 // The result is returned to an IPC message to |destination| thus it should | 86 // The result is returned to an IPC message to |destination| thus it should |
| 85 // not be null. | 87 // not be null. |
| 86 void RequestTextCheck(int route_id, | 88 void RequestTextCheck(int route_id, |
| 87 int identifier, | 89 int identifier, |
| 88 int document_tag, | 90 int document_tag, |
| 89 const string16& text, | 91 const string16& text, |
| 90 BrowserMessageFilter* destination); | 92 content::BrowserMessageFilter* destination); |
| 91 | 93 |
| 92 } // namespace spellcheck_mac | 94 } // namespace spellcheck_mac |
| 93 | 95 |
| 94 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PLATFORM_MAC_H_ | 96 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PLATFORM_MAC_H_ |
| OLD | NEW |