Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_PLATFORM_ENGINE_H_ | 8 #ifndef CHROME_BROWSER_SPELLCHECKER_PLATFORM_ENGINE_H_ |
| 9 #define CHROME_BROWSER_SPELLCHECKER_PLATFORM_ENGINE_H_ | 9 #define CHROME_BROWSER_SPELLCHECKER_PLATFORM_ENGINE_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.h" | |
| 15 #include "base/string16.h" | 16 #include "base/string16.h" |
| 16 | 17 |
| 18 class BrowserMessageFilter; | |
| 19 | |
| 17 namespace SpellCheckerPlatform { | 20 namespace SpellCheckerPlatform { |
| 18 | 21 |
| 19 // Get the languages supported by the platform spellchecker and store them in | 22 // Get the languages supported by the platform spellchecker and store them in |
| 20 // |spellcheck_languages|. Note that they must be converted to | 23 // |spellcheck_languages|. Note that they must be converted to |
| 21 // Chromium style codes (en-US not en_US). See spellchecker.cc for a full list. | 24 // Chromium style codes (en-US not en_US). See spellchecker.cc for a full list. |
| 22 void GetAvailableLanguages(std::vector<std::string>* spellcheck_languages); | 25 void GetAvailableLanguages(std::vector<std::string>* spellcheck_languages); |
| 23 | 26 |
| 24 // Returns true if there is a platform-specific spellchecker that can be used. | 27 // Returns true if there is a platform-specific spellchecker that can be used. |
| 25 bool SpellCheckerAvailable(); | 28 bool SpellCheckerAvailable(); |
| 26 | 29 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 74 // the tag for sure is to ask the renderer, which would mean blocking in the | 77 // the tag for sure is to ask the renderer, which would mean blocking in the |
| 75 // browser, so (on the mac, anyway) we remember the most recent tag and use | 78 // browser, so (on the mac, anyway) we remember the most recent tag and use |
| 76 // it, since it should always be from the same document. | 79 // it, since it should always be from the same document. |
| 77 void IgnoreWord(const string16& word); | 80 void IgnoreWord(const string16& word); |
| 78 | 81 |
| 79 // Tells the platform spellchecker that a document associated with a tag has | 82 // Tells the platform spellchecker that a document associated with a tag has |
| 80 // closed. Generally, this means that any ignored words associated with that | 83 // closed. Generally, this means that any ignored words associated with that |
| 81 // document can now be forgotten. | 84 // document can now be forgotten. |
| 82 void CloseDocumentWithTag(int tag); | 85 void CloseDocumentWithTag(int tag); |
| 83 | 86 |
| 87 void RequestTextCheck(int route_id, | |
|
pink (ping after 24hrs)
2011/02/11 17:33:40
Comment all public api. Can |destination| be null?
gmorrita
2011/02/17 11:39:44
Done.
| |
| 88 int identifier, | |
| 89 int document_tag, | |
| 90 const string16& text, | |
| 91 BrowserMessageFilter* destination); | |
| 92 | |
| 84 } // namespace SpellCheckerPlatform | 93 } // namespace SpellCheckerPlatform |
| 85 | 94 |
| 86 #endif // CHROME_BROWSER_SPELLCHECKER_PLATFORM_ENGINE_H_ | 95 #endif // CHROME_BROWSER_SPELLCHECKER_PLATFORM_ENGINE_H_ |
| OLD | NEW |