Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9578)

Unified Diff: chrome/renderer/spellchecker/spellcheck_provider.cc

Issue 10536190: Use WebFrame::replaceMisspelledRange() to replace a misspelled range with text. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/spellchecker/spellcheck_provider.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/spellchecker/spellcheck_provider.cc
===================================================================
--- chrome/renderer/spellchecker/spellcheck_provider.cc (revision 142657)
+++ chrome/renderer/spellchecker/spellcheck_provider.cc (working copy)
@@ -166,6 +166,7 @@
bool SpellCheckProvider::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(SpellCheckProvider, message)
+ IPC_MESSAGE_HANDLER(SpellCheckMsg_Replace, OnReplace)
#if !defined(OS_MACOSX)
IPC_MESSAGE_HANDLER(SpellCheckMsg_RespondSpellingService,
OnRespondSpellingService)
@@ -286,6 +287,12 @@
#endif
}
+void SpellCheckProvider::OnReplace(const string16& text) {
+ if (!render_view() || !render_view()->GetWebView())
+ return;
+ render_view()->GetWebView()->focusedFrame()->replaceMisspelledRange(text);
+}
+
#if !defined(OS_MACOSX)
void SpellCheckProvider::OnRespondSpellingService(
int identifier,
« no previous file with comments | « chrome/renderer/spellchecker/spellcheck_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698