| Index: chrome/browser/spellchecker/spellcheck_custom_dictionary.h
|
| diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary.h b/chrome/browser/spellchecker/spellcheck_custom_dictionary.h
|
| index 0043bfbda273fe664f545f0472b907959219cc00..939a349e9f9558171afce10918fc2fd28d438383 100644
|
| --- a/chrome/browser/spellchecker/spellcheck_custom_dictionary.h
|
| +++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary.h
|
| @@ -10,6 +10,7 @@
|
|
|
| #include "base/file_path.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "base/memory/weak_ptr.h"
|
| #include "chrome/browser/spellchecker/spellcheck_dictionary.h"
|
| #include "chrome/common/spellcheck_common.h"
|
|
|
| @@ -30,6 +31,14 @@ class SpellcheckCustomDictionary : public SpellcheckDictionary {
|
| void LoadDictionaryIntoCustomWordList(
|
| chrome::spellcheck_common::WordList* custom_words);
|
|
|
| + // Adds the given word to the custom words list and inform renderer of the
|
| + // update.
|
| + void AddWord(const std::string& word);
|
| +
|
| + // The reply point for PostTaskAndReply. Called when AddWord is finished
|
| + // adding a word in the background.
|
| + void AddWordComplete(const std::string& word);
|
| +
|
| private:
|
| // In-memory cache of the custom words file.
|
| chrome::spellcheck_common::WordList custom_words_;
|
| @@ -37,6 +46,8 @@ class SpellcheckCustomDictionary : public SpellcheckDictionary {
|
| // A path for custom dictionary per profile.
|
| FilePath custom_dictionary_path_;
|
|
|
| + base::WeakPtrFactory<SpellcheckCustomDictionary> weak_ptr_factory_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(SpellcheckCustomDictionary);
|
| };
|
|
|
|
|