| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_SPELLCHECK_MESSAGE_FILTER_H_ | 5 #ifndef CHROME_BROWSER_SPELLCHECK_MESSAGE_FILTER_H_ |
| 6 #define CHROME_BROWSER_SPELLCHECK_MESSAGE_FILTER_H_ | 6 #define CHROME_BROWSER_SPELLCHECK_MESSAGE_FILTER_H_ |
| 7 | 7 |
| 8 #include "content/browser/browser_message_filter.h" | 8 #include "content/browser/browser_message_filter.h" |
| 9 | 9 |
| 10 // A message filter implementation that receives | 10 // A message filter implementation that receives |
| 11 // the platform spell checker requests from SpellCheckProvider. | 11 // the platform spell checker requests from SpellCheckProvider. |
| 12 class SpellCheckMessageFilter : public BrowserMessageFilter { | 12 class SpellCheckMessageFilter : public BrowserMessageFilter { |
| 13 public: | 13 public: |
| 14 SpellCheckMessageFilter(); | 14 explicit SpellCheckMessageFilter(int render_process_id); |
| 15 ~SpellCheckMessageFilter(); | 15 ~SpellCheckMessageFilter(); |
| 16 | 16 |
| 17 // BrowserMessageFilter implementation. | 17 // BrowserMessageFilter implementation. |
| 18 virtual void OverrideThreadForMessage(const IPC::Message& message, |
| 19 BrowserThread::ID* thread); |
| 18 virtual bool OnMessageReceived(const IPC::Message& message, | 20 virtual bool OnMessageReceived(const IPC::Message& message, |
| 19 bool* message_was_ok); | 21 bool* message_was_ok); |
| 20 | 22 |
| 21 private: | 23 private: |
| 22 void OnPlatformCheckSpelling(const string16& word, int tag, bool* correct); | 24 void OnPlatformCheckSpelling(const string16& word, int tag, bool* correct); |
| 23 void OnPlatformFillSuggestionList(const string16& word, | 25 void OnPlatformFillSuggestionList(const string16& word, |
| 24 std::vector<string16>* suggestions); | 26 std::vector<string16>* suggestions); |
| 25 void OnGetDocumentTag(int* tag); | 27 void OnGetDocumentTag(int* tag); |
| 26 void OnDocumentWithTagClosed(int tag); | 28 void OnDocumentWithTagClosed(int tag); |
| 27 void OnShowSpellingPanel(bool show); | 29 void OnShowSpellingPanel(bool show); |
| 28 void OnUpdateSpellingPanelWithMisspelledWord(const string16& word); | 30 void OnUpdateSpellingPanelWithMisspelledWord(const string16& word); |
| 29 void OnPlatformRequestTextCheck(int route_id, | 31 void OnPlatformRequestTextCheck(int route_id, |
| 30 int identifier, | 32 int identifier, |
| 31 int document_tag, | 33 int document_tag, |
| 32 const string16& text); | 34 const string16& text); |
| 35 void OnSpellCheckerRequestDictionary(); |
| 36 |
| 37 int render_process_id_; |
| 33 }; | 38 }; |
| 34 | 39 |
| 35 #endif // CHROME_BROWSER_SPELLCHECK_MESSAGE_FILTER_H_ | 40 #endif // CHROME_BROWSER_SPELLCHECK_MESSAGE_FILTER_H_ |
| OLD | NEW |