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

Side by Side Diff: chrome/renderer/spellchecker/spellcheck.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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 string16 GetAutoCorrectionWord(const string16& word, int tag); 58 string16 GetAutoCorrectionWord(const string16& word, int tag);
59 59
60 // Turn auto spell correct support ON or OFF. 60 // Turn auto spell correct support ON or OFF.
61 // |turn_on| = true means turn ON; false means turn OFF. 61 // |turn_on| = true means turn ON; false means turn OFF.
62 void EnableAutoSpellCorrect(bool turn_on); 62 void EnableAutoSpellCorrect(bool turn_on);
63 63
64 // 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
65 // |hunspell_| has been initialized. 65 // |hunspell_| has been initialized.
66 void WordAdded(const std::string& word); 66 void WordAdded(const std::string& word);
67 67
68 // Returns true if the spellchecker delegate checking to a system-provided
69 // checker on the browser process.
70 bool is_using_platform_spelling_engine() const {
71 return is_using_platform_spelling_engine_;
72 }
73
68 private: 74 private:
69 // Initializes the Hunspell dictionary, or does nothing if |hunspell_| is 75 // Initializes the Hunspell dictionary, or does nothing if |hunspell_| is
70 // non-null. This blocks. 76 // non-null. This blocks.
71 void InitializeHunspell(); 77 void InitializeHunspell();
72 78
73 // If there is no dictionary file, then this requests one from the browser 79 // If there is no dictionary file, then this requests one from the browser
74 // and does not block. In this case it returns true. 80 // and does not block. In this case it returns true.
75 // If there is a dictionary file, but Hunspell has not been loaded, then 81 // If there is a dictionary file, but Hunspell has not been loaded, then
76 // this loads Hunspell. 82 // this loads Hunspell.
77 // If Hunspell is already loaded, this does nothing. In both the latter cases 83 // If Hunspell is already loaded, this does nothing. In both the latter cases
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // This flags whether we have ever been initialized, or have asked the browser 123 // This flags whether we have ever been initialized, or have asked the browser
118 // for a dictionary. The value indicates whether we should request a 124 // for a dictionary. The value indicates whether we should request a
119 // dictionary from the browser when the render view asks us to check the 125 // dictionary from the browser when the render view asks us to check the
120 // spelling of a word. 126 // spelling of a word.
121 bool initialized_; 127 bool initialized_;
122 128
123 DISALLOW_COPY_AND_ASSIGN(SpellCheck); 129 DISALLOW_COPY_AND_ASSIGN(SpellCheck);
124 }; 130 };
125 131
126 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_ 132 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_H_
OLDNEW
« no previous file with comments | « chrome/renderer/render_view_observer.cc ('k') | chrome/renderer/spellchecker/spellcheck_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698