| OLD | NEW |
| (Empty) | |
| 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 #include "chrome/browser/spellcheck_message_filter.h" |
| 6 |
| 7 #include "chrome/browser/spellchecker_platform_engine.h" |
| 8 #include "chrome/common/render_messages.h" |
| 9 |
| 10 SpellCheckMessageFilter::SpellCheckMessageFilter() { |
| 11 } |
| 12 |
| 13 SpellCheckMessageFilter::~SpellCheckMessageFilter() { |
| 14 } |
| 15 |
| 16 bool SpellCheckMessageFilter::OnMessageReceived(const IPC::Message& message, |
| 17 bool* message_was_ok) { |
| 18 bool handled = true; |
| 19 IPC_BEGIN_MESSAGE_MAP_EX(SpellCheckMessageFilter, message, *message_was_ok) |
| 20 IPC_MESSAGE_HANDLER(ViewHostMsg_SpellChecker_PlatformRequestTextCheck, |
| 21 OnPlatformRequestTextCheck) |
| 22 IPC_MESSAGE_UNHANDLED(handled = false) |
| 23 IPC_END_MESSAGE_MAP() |
| 24 return handled; |
| 25 } |
| 26 |
| 27 void SpellCheckMessageFilter::OnPlatformRequestTextCheck( |
| 28 int route_id, |
| 29 int identifier, |
| 30 int document_tag, |
| 31 const string16& text) { |
| 32 SpellCheckerPlatform::RequestTextCheck( |
| 33 route_id, identifier, document_tag, text, this); |
| 34 } |
| OLD | NEW |