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

Side by Side Diff: chrome/renderer/spellchecker/spellcheck.h

Issue 395007: Move Mac to using renderer spellchecker. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: ui test fix Created 11 years, 1 month 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/renderer/render_view.cc ('k') | chrome/renderer/spellchecker/spellcheck.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 #ifndef CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ 5 #ifndef CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_
6 #define CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ 6 #define CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 bool SpellCheckWord(const char16* in_word, 45 bool SpellCheckWord(const char16* in_word,
46 int in_word_len, 46 int in_word_len,
47 int tag, 47 int tag,
48 int* misspelling_start, 48 int* misspelling_start,
49 int* misspelling_len, 49 int* misspelling_len,
50 std::vector<string16>* optional_suggestions); 50 std::vector<string16>* optional_suggestions);
51 51
52 // Find a possible correctly spelled word for a misspelled word. Computes an 52 // Find a possible correctly spelled word for a misspelled word. Computes an
53 // empty string if input misspelled word is too long, there is ambiguity, or 53 // empty string if input misspelled word is too long, there is ambiguity, or
54 // the correct spelling cannot be determined. 54 // the correct spelling cannot be determined.
55 // NOTE: If using the platform spellchecker, this will send a *lot* of sync
56 // IPCs. We should probably refactor this if we ever plan to take it out from
57 // behind its command line flag.
55 string16 GetAutoCorrectionWord(const string16& word, int tag); 58 string16 GetAutoCorrectionWord(const string16& word, int tag);
56 59
57 // Turn auto spell correct support ON or OFF. 60 // Turn auto spell correct support ON or OFF.
58 // |turn_on| = true means turn ON; false means turn OFF. 61 // |turn_on| = true means turn ON; false means turn OFF.
59 void EnableAutoSpellCorrect(bool turn_on); 62 void EnableAutoSpellCorrect(bool turn_on);
60 63
61 // Add a word to the custom list. This may be called before or after 64 // Add a word to the custom list. This may be called before or after
62 // |hunspell_| has been initialized. 65 // |hunspell_| has been initialized.
63 void WordAdded(const std::string& word); 66 void WordAdded(const std::string& word);
64 67
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // This flags whether we have ever been initialized, or have asked the browser 117 // This flags whether we have ever been initialized, or have asked the browser
115 // for a dictionary. The value indicates whether we should request a 118 // for a dictionary. The value indicates whether we should request a
116 // dictionary from the browser when the render view asks us to check the 119 // dictionary from the browser when the render view asks us to check the
117 // spelling of a word. 120 // spelling of a word.
118 bool initialized_; 121 bool initialized_;
119 122
120 DISALLOW_COPY_AND_ASSIGN(SpellCheck); 123 DISALLOW_COPY_AND_ASSIGN(SpellCheck);
121 }; 124 };
122 125
123 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ 126 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_
OLDNEW
« no previous file with comments | « chrome/renderer/render_view.cc ('k') | chrome/renderer/spellchecker/spellcheck.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698