Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: chrome/browser/spellchecker_platform_engine.h

Issue 6392045: Integrating Mac OS Grammar checker into Chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated the patch to catch up WebKit side changes. Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
17 #include "chrome/common/text_checking_result.h"
16 18
17 namespace SpellCheckerPlatform { 19 namespace SpellCheckerPlatform {
18 20
19 // Get the languages supported by the platform spellchecker and store them in 21 // Get the languages supported by the platform spellchecker and store them in
20 // |spellcheck_languages|. Note that they must be converted to 22 // |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. 23 // Chromium style codes (en-US not en_US). See spellchecker.cc for a full list.
22 void GetAvailableLanguages(std::vector<std::string>* spellcheck_languages); 24 void GetAvailableLanguages(std::vector<std::string>* spellcheck_languages);
23 25
24 // Returns true if there is a platform-specific spellchecker that can be used. 26 // Returns true if there is a platform-specific spellchecker that can be used.
25 bool SpellCheckerAvailable(); 27 bool SpellCheckerAvailable();
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // the tag for sure is to ask the renderer, which would mean blocking in the 76 // 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 77 // 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. 78 // it, since it should always be from the same document.
77 void IgnoreWord(const string16& word); 79 void IgnoreWord(const string16& word);
78 80
79 // Tells the platform spellchecker that a document associated with a tag has 81 // Tells the platform spellchecker that a document associated with a tag has
80 // closed. Generally, this means that any ignored words associated with that 82 // closed. Generally, this means that any ignored words associated with that
81 // document can now be forgotten. 83 // document can now be forgotten.
82 void CloseDocumentWithTag(int tag); 84 void CloseDocumentWithTag(int tag);
83 85
86 void RequestTextCheck(const string16& text, int tag,
87 Callback1<const TextCheckingResultList&>::Type* callback);
Hironori Bono 2011/02/09 05:43:51 nit: align all parameters if possible.
gmorrita 2011/02/10 02:15:21 Done.
88
84 } // namespace SpellCheckerPlatform 89 } // namespace SpellCheckerPlatform
85 90
86 #endif // CHROME_BROWSER_SPELLCHECKER_PLATFORM_ENGINE_H_ 91 #endif // CHROME_BROWSER_SPELLCHECKER_PLATFORM_ENGINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698