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

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 to ToT 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
« no previous file with comments | « chrome/browser/spellchecker_mac.mm ('k') | chrome/browser/spellchecker_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
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
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 // Requests an asyncronous spell and grammar checking.
88 // The result is returned to an IPC message to |destination| thus it should
89 // not be null.
90 void RequestTextCheck(int route_id,
91 int identifier,
92 int document_tag,
93 const string16& text,
94 BrowserMessageFilter* destination);
95
84 } // namespace SpellCheckerPlatform 96 } // namespace SpellCheckerPlatform
85 97
86 #endif // CHROME_BROWSER_SPELLCHECKER_PLATFORM_ENGINE_H_ 98 #endif // CHROME_BROWSER_SPELLCHECKER_PLATFORM_ENGINE_H_
OLDNEW
« no previous file with comments | « chrome/browser/spellchecker_mac.mm ('k') | chrome/browser/spellchecker_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698