| Index: chrome/renderer/spellchecker/spellcheck.cc
|
| diff --git a/chrome/renderer/spellchecker/spellcheck.cc b/chrome/renderer/spellchecker/spellcheck.cc
|
| index d2895481b9133177f9b7b3b5c0db7d04e0bd3d93..01eec7e4d5d2fdcf502a063481d3b3189ede1cfe 100644
|
| --- a/chrome/renderer/spellchecker/spellcheck.cc
|
| +++ b/chrome/renderer/spellchecker/spellcheck.cc
|
| @@ -56,6 +56,7 @@ bool SpellCheck::OnControlMessageReceived(const IPC::Message& message) {
|
| IPC_BEGIN_MESSAGE_MAP(SpellCheck, message)
|
| IPC_MESSAGE_HANDLER(SpellCheckMsg_Init, OnInit)
|
| IPC_MESSAGE_HANDLER(SpellCheckMsg_WordAdded, OnWordAdded)
|
| + IPC_MESSAGE_HANDLER(SpellCheckMsg_WordRemoved, OnWordRemoved)
|
| IPC_MESSAGE_HANDLER(SpellCheckMsg_EnableAutoSpellCorrect,
|
| OnEnableAutoSpellCorrect)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| @@ -77,10 +78,15 @@ void SpellCheck::OnInit(IPC::PlatformFileForTransit bdict_file,
|
| }
|
|
|
| void SpellCheck::OnWordAdded(const std::string& word) {
|
| - if (platform_spelling_engine_)
|
| + if (platform_spelling_engine_.get())
|
| platform_spelling_engine_->OnWordAdded(word);
|
| }
|
|
|
| +void SpellCheck::OnWordRemoved(const std::string& word) {
|
| + if (platform_spelling_engine_.get())
|
| + platform_spelling_engine_->OnWordRemoved(word);
|
| +}
|
| +
|
| void SpellCheck::OnEnableAutoSpellCorrect(bool enable) {
|
| auto_spell_correct_turned_on_ = enable;
|
| }
|
| @@ -124,7 +130,7 @@ bool SpellCheck::SpellCheckWord(
|
| return true;
|
|
|
| // Do nothing if spell checking is disabled.
|
| - if (!platform_spelling_engine_ ||
|
| + if (!platform_spelling_engine_.get() ||
|
| !platform_spelling_engine_->IsEnabled())
|
| return true;
|
|
|
|
|