| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/spellchecker/spellcheck_message_filter.h" | 5 #include "chrome/browser/spellchecker/spellcheck_message_filter.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 if (message.type() == SpellCheckHostMsg_RequestDictionary::ID || | 36 if (message.type() == SpellCheckHostMsg_RequestDictionary::ID || |
| 37 message.type() == SpellCheckHostMsg_NotifyChecked::ID || | 37 message.type() == SpellCheckHostMsg_NotifyChecked::ID || |
| 38 message.type() == SpellCheckHostMsg_RespondDocumentMarkers::ID) | 38 message.type() == SpellCheckHostMsg_RespondDocumentMarkers::ID) |
| 39 *thread = BrowserThread::UI; | 39 *thread = BrowserThread::UI; |
| 40 #if !defined(OS_MACOSX) | 40 #if !defined(OS_MACOSX) |
| 41 if (message.type() == SpellCheckHostMsg_CallSpellingService::ID) | 41 if (message.type() == SpellCheckHostMsg_CallSpellingService::ID) |
| 42 *thread = BrowserThread::UI; | 42 *thread = BrowserThread::UI; |
| 43 #endif | 43 #endif |
| 44 } | 44 } |
| 45 | 45 |
| 46 bool SpellCheckMessageFilter::OnMessageReceived(const IPC::Message& message, | 46 bool SpellCheckMessageFilter::OnMessageReceived(const IPC::Message& message) { |
| 47 bool* message_was_ok) { | |
| 48 bool handled = true; | 47 bool handled = true; |
| 49 IPC_BEGIN_MESSAGE_MAP_EX(SpellCheckMessageFilter, message, *message_was_ok) | 48 IPC_BEGIN_MESSAGE_MAP(SpellCheckMessageFilter, message) |
| 50 IPC_MESSAGE_HANDLER(SpellCheckHostMsg_RequestDictionary, | 49 IPC_MESSAGE_HANDLER(SpellCheckHostMsg_RequestDictionary, |
| 51 OnSpellCheckerRequestDictionary) | 50 OnSpellCheckerRequestDictionary) |
| 52 IPC_MESSAGE_HANDLER(SpellCheckHostMsg_NotifyChecked, | 51 IPC_MESSAGE_HANDLER(SpellCheckHostMsg_NotifyChecked, |
| 53 OnNotifyChecked) | 52 OnNotifyChecked) |
| 54 IPC_MESSAGE_HANDLER(SpellCheckHostMsg_RespondDocumentMarkers, | 53 IPC_MESSAGE_HANDLER(SpellCheckHostMsg_RespondDocumentMarkers, |
| 55 OnRespondDocumentMarkers) | 54 OnRespondDocumentMarkers) |
| 56 #if !defined(OS_MACOSX) | 55 #if !defined(OS_MACOSX) |
| 57 IPC_MESSAGE_HANDLER(SpellCheckHostMsg_CallSpellingService, | 56 IPC_MESSAGE_HANDLER(SpellCheckHostMsg_CallSpellingService, |
| 58 OnCallSpellingService) | 57 OnCallSpellingService) |
| 59 #endif | 58 #endif |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 base::Unretained(this), | 181 base::Unretained(this), |
| 183 route_id, | 182 route_id, |
| 184 identifier, | 183 identifier, |
| 185 markers)); | 184 markers)); |
| 186 } | 185 } |
| 187 #endif | 186 #endif |
| 188 | 187 |
| 189 SpellcheckService* SpellCheckMessageFilter::GetSpellcheckService() const { | 188 SpellcheckService* SpellCheckMessageFilter::GetSpellcheckService() const { |
| 190 return SpellcheckServiceFactory::GetForRenderProcessId(render_process_id_); | 189 return SpellcheckServiceFactory::GetForRenderProcessId(render_process_id_); |
| 191 } | 190 } |
| OLD | NEW |