Chromium Code Reviews| Index: chrome/browser/spellchecker/spellcheck_message_filter.cc |
| diff --git a/chrome/browser/spellchecker/spellcheck_message_filter.cc b/chrome/browser/spellchecker/spellcheck_message_filter.cc |
| index 622995e1599decd76ae42cfc845af0973e8ecf79..558402c149c471be941784ba1f6d6be6cfc3636e 100644 |
| --- a/chrome/browser/spellchecker/spellcheck_message_filter.cc |
| +++ b/chrome/browser/spellchecker/spellcheck_message_filter.cc |
| @@ -8,7 +8,7 @@ |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/spellchecker/spellcheck_host.h" |
| #include "chrome/browser/spellchecker/spellcheck_host_metrics.h" |
| -#include "chrome/browser/spellchecker/spellchecker_platform_engine.h" |
| +#include "chrome/browser/spellchecker/spellchecker_mac.h" |
| #include "chrome/common/spellcheck_messages.h" |
| #include "content/public/browser/render_process_host.h" |
| @@ -57,30 +57,42 @@ bool SpellCheckMessageFilter::OnMessageReceived(const IPC::Message& message, |
| void SpellCheckMessageFilter::OnPlatformCheckSpelling(const string16& word, |
|
Robert Sesek
2011/12/08 18:54:33
In the future are you going to pull this out into
jeremy
2011/12/08 19:18:46
Yes, that's the plan. I tried to keep this change
|
| int tag, |
| bool* correct) { |
| - *correct = SpellCheckerPlatform::CheckSpelling(word, tag); |
| +#if defined(OS_MACOSX) |
| + *correct = SpellCheckerMac::CheckSpelling(word, tag); |
| +#endif |
| } |
| void SpellCheckMessageFilter::OnPlatformFillSuggestionList( |
| const string16& word, |
| std::vector<string16>* suggestions) { |
| - SpellCheckerPlatform::FillSuggestionList(word, suggestions); |
| +#if defined(OS_MACOSX) |
| + SpellCheckerMac::FillSuggestionList(word, suggestions); |
| +#endif |
| } |
| void SpellCheckMessageFilter::OnGetDocumentTag(int* tag) { |
| - *tag = SpellCheckerPlatform::GetDocumentTag(); |
| +#if defined(OS_MACOSX) |
| + *tag = SpellCheckerMac::GetDocumentTag(); |
| +#endif |
| } |
| void SpellCheckMessageFilter::OnDocumentWithTagClosed(int tag) { |
| - SpellCheckerPlatform::CloseDocumentWithTag(tag); |
| +#if defined(OS_MACOSX) |
| + SpellCheckerMac::CloseDocumentWithTag(tag); |
| +#endif |
| } |
| void SpellCheckMessageFilter::OnShowSpellingPanel(bool show) { |
| - SpellCheckerPlatform::ShowSpellingPanel(show); |
| +#if defined(OS_MACOSX) |
| + SpellCheckerMac::ShowSpellingPanel(show); |
| +#endif |
| } |
| void SpellCheckMessageFilter::OnUpdateSpellingPanelWithMisspelledWord( |
| const string16& word) { |
| - SpellCheckerPlatform::UpdateSpellingPanelWithMisspelledWord(word); |
| +#if defined(OS_MACOSX) |
| + SpellCheckerMac::UpdateSpellingPanelWithMisspelledWord(word); |
| +#endif |
| } |
| void SpellCheckMessageFilter::OnPlatformRequestTextCheck( |
| @@ -88,8 +100,10 @@ void SpellCheckMessageFilter::OnPlatformRequestTextCheck( |
| int identifier, |
| int document_tag, |
| const string16& text) { |
| - SpellCheckerPlatform::RequestTextCheck( |
| +#if defined(OS_MACOSX) |
| + SpellCheckerMac::RequestTextCheck( |
| route_id, identifier, document_tag, text, this); |
| +#endif |
| } |
| void SpellCheckMessageFilter::OnSpellCheckerRequestDictionary() { |