Home | History | Annotate | Download | only in browser
      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
      3 // found in the LICENSE file.
      4 
      5 #ifndef CHROME_BROWSER_SPELLCHECK_MESSAGE_FILTER_H_
      6 #define CHROME_BROWSER_SPELLCHECK_MESSAGE_FILTER_H_
      7 
      8 #include "content/browser/browser_message_filter.h"
      9 
     10 // A message filter implementation that receives
     11 // the platform spell checker requests from SpellCheckProvider.
     12 class SpellCheckMessageFilter : public BrowserMessageFilter {
     13  public:
     14   SpellCheckMessageFilter();
     15   ~SpellCheckMessageFilter();
     16 
     17   // BrowserMessageFilter implementation.
     18   virtual bool OnMessageReceived(const IPC::Message& message,
     19                                  bool* message_was_ok);
     20 
     21  private:
     22   void OnPlatformCheckSpelling(const string16& word, int tag, bool* correct);
     23   void OnPlatformFillSuggestionList(const string16& word,
     24                                     std::vector<string16>* suggestions);
     25   void OnGetDocumentTag(int* tag);
     26   void OnDocumentWithTagClosed(int tag);
     27   void OnShowSpellingPanel(bool show);
     28   void OnUpdateSpellingPanelWithMisspelledWord(const string16& word);
     29   void OnPlatformRequestTextCheck(int route_id,
     30                                   int identifier,
     31                                   int document_tag,
     32                                   const string16& text);
     33 };
     34 
     35 #endif  // CHROME_BROWSER_SPELLCHECK_MESSAGE_FILTER_H_
     36