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

Unified Diff: chrome/renderer/spellchecker/spellcheck.h

Issue 11476005: [Spellcheck] Make sure context menu and actual spellcheck state are in sync. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/spellchecker/spellcheck.h
diff --git a/chrome/renderer/spellchecker/spellcheck.h b/chrome/renderer/spellchecker/spellcheck.h
index 851b43efd39aae8c2e88636dc97fd81099a0ae72..fc8760b022ec196b9b4852ae505bce6267abd26e 100644
--- a/chrome/renderer/spellchecker/spellcheck.h
+++ b/chrome/renderer/spellchecker/spellcheck.h
@@ -100,6 +100,8 @@ class SpellCheck : public content::RenderProcessObserver,
const std::vector<SpellCheckResult>& spellcheck_results,
WebKit::WebVector<WebKit::WebTextCheckingResult>* textcheck_results);
+ bool is_spellcheck_enabled() { return spellcheck_enabled_; }
+
private:
friend class SpellCheckTest;
FRIEND_TEST_ALL_PREFIXES(SpellCheckTest, GetAutoCorrectionWord_EN_US);
@@ -119,6 +121,7 @@ class SpellCheck : public content::RenderProcessObserver,
void OnWordAdded(const std::string& word);
void OnWordRemoved(const std::string& word);
void OnEnableAutoSpellCorrect(bool enable);
+ void OnEnableSpellCheck(bool enable);
// If there is no dictionary file, then this requests one from the browser
// and does not block. In this case it returns true.
@@ -165,6 +168,9 @@ class SpellCheck : public content::RenderProcessObserver,
// Remember state for auto spell correct.
bool auto_spell_correct_turned_on_;
+ // Remember state for spellchecking.
+ bool spellcheck_enabled_;
+
// Pointer to a platform-specific spelling engine, if it is in use. This
// should only be set if hunspell is not used. (I.e. on OSX, for now)
scoped_ptr<SpellingEngine> platform_spelling_engine_;

Powered by Google App Engine
This is Rietveld 408576698