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

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

Issue 11362063: Editing the custom spelling dictionary (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Exclude custom dictionary WebUI from mac Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/spellchecker/hunspell_engine.h
diff --git a/chrome/renderer/spellchecker/hunspell_engine.h b/chrome/renderer/spellchecker/hunspell_engine.h
index 0d91b2403f99f148b5373d01732f9591cb88c390..f96e5de3e34208db77cecbc6245ee45568efe19b 100644
--- a/chrome/renderer/spellchecker/hunspell_engine.h
+++ b/chrome/renderer/spellchecker/hunspell_engine.h
@@ -9,6 +9,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/string16.h"
#include "base/utf_string_conversions.h"
+#include "chrome/common/spellcheck_common.h"
#include "chrome/renderer/spellchecker/spelling_engine.h"
#include <string>
@@ -30,6 +31,8 @@ class HunspellEngine : public SpellingEngine {
virtual void FillSuggestionList(const string16& wrong_word,
std::vector<string16>* optional_suggestions) OVERRIDE;
virtual void OnWordAdded(const std::string& word) OVERRIDE;
+ virtual void OnWordRemoved(const std::string& word) OVERRIDE;
+
private:
// Initializes the Hunspell dictionary, or does nothing if |hunspell_| is
// non-null. This blocks.
@@ -38,13 +41,16 @@ class HunspellEngine : public SpellingEngine {
// Add the given custom word to |hunspell_|.
void AddWordToHunspell(const std::string& word);
+ // Remove the given custom word from |hunspell_|.
+ void RemoveWordFromHunspell(const std::string& word);
+
// We memory-map the BDict file.
scoped_ptr<file_util::MemoryMappedFile> bdict_file_;
// The hunspell dictionary in use.
scoped_ptr<Hunspell> hunspell_;
- std::vector<std::string> custom_words_;
+ chrome::spellcheck_common::WordList custom_words_;
base::PlatformFile file_;
« no previous file with comments | « chrome/renderer/spellchecker/cocoa_spelling_engine_mac.cc ('k') | chrome/renderer/spellchecker/hunspell_engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698