#include "chrome/browser/spellchecker/spellcheck_host_metrics.h"
#include "chrome/browser/spellchecker/spellcheck_service.h"
#include "chrome/browser/spellchecker/spelling_service_client.h"
-#include "chrome/common/pref_names.h"
#include "chrome/common/spellcheck_marker.h"
#include "chrome/common/spellcheck_messages.h"
#include "content/public/browser/render_process_host.h"
using content::BrowserThread;
SpellCheckMessageFilter::SpellCheckMessageFilter(int render_process_id)
- : render_process_id_(render_process_id),
+ : BrowserMessageFilter(SpellCheckMsgStart),
+ render_process_id_(render_process_id),
client_(new SpellingServiceClient) {
}
#endif
}
-bool SpellCheckMessageFilter::OnMessageReceived(const IPC::Message& message,
- bool* message_was_ok) {
+bool SpellCheckMessageFilter::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
- IPC_BEGIN_MESSAGE_MAP_EX(SpellCheckMessageFilter, message, *message_was_ok)
+ IPC_BEGIN_MESSAGE_MAP(SpellCheckMessageFilter, message)
IPC_MESSAGE_HANDLER(SpellCheckHostMsg_RequestDictionary,
OnSpellCheckerRequestDictionary)
IPC_MESSAGE_HANDLER(SpellCheckHostMsg_NotifyChecked,
// than once if we get requests from different renderers.
}
-void SpellCheckMessageFilter::OnNotifyChecked(const string16& word,
+void SpellCheckMessageFilter::OnNotifyChecked(const base::string16& word,
bool misspelled) {
SpellcheckService* spellcheck = GetSpellcheckService();
// Spellcheck service may not be available for a renderer process that is
void SpellCheckMessageFilter::OnCallSpellingService(
int route_id,
int identifier,
- const string16& text,
+ const base::string16& text,
std::vector<SpellCheckMarker> markers) {
DCHECK(!text.empty());
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
int identifier,
const std::vector<SpellCheckMarker>& markers,
bool success,
- const string16& text,
+ const base::string16& text,
const std::vector<SpellCheckResult>& results) {
SpellcheckService* spellcheck = GetSpellcheckService();
// Spellcheck service may not be available for a renderer process that is
// in-dictionary feedback.
std::vector<SpellCheckResult>::iterator write_iter;
std::vector<SpellCheckResult>::iterator iter;
- std::string text_copy = UTF16ToUTF8(text);
+ std::string text_copy = base::UTF16ToUTF8(text);
for (iter = write_iter = results_copy.begin();
iter != results_copy.end();
++iter) {
// CallSpellingService always executes the callback OnTextCheckComplete.
// (Which, in turn, sends a SpellCheckMsg_RespondSpellingService)
void SpellCheckMessageFilter::CallSpellingService(
- const string16& text,
+ const base::string16& text,
int route_id,
int identifier,
const std::vector<SpellCheckMarker>& markers) {