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

Unified Diff: chrome/renderer/render_view.cc

Issue 13731: [chromium-reviews] Add "Enable spell check for this field" menu option in sub context menu for c... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years 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
Index: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 6726)
+++ chrome/renderer/render_view.cc (working copy)
@@ -329,6 +329,7 @@
IPC_MESSAGE_HANDLER(ViewMsg_Copy, OnCopy)
IPC_MESSAGE_HANDLER(ViewMsg_Paste, OnPaste)
IPC_MESSAGE_HANDLER(ViewMsg_Replace, OnReplace)
+ IPC_MESSAGE_HANDLER(ViewMsg_ToggleSpellCheck, OnToggleSpellCheck)
IPC_MESSAGE_HANDLER(ViewMsg_Delete, OnDelete)
IPC_MESSAGE_HANDLER(ViewMsg_SelectAll, OnSelectAll)
IPC_MESSAGE_HANDLER(ViewMsg_CopyImageAt, OnCopyImageAt)
@@ -976,6 +977,13 @@
webview()->GetFocusedFrame()->Replace(text);
}
+void RenderView::OnToggleSpellCheck() {
+ if (!webview())
+ return;
+
+ webview()->GetFocusedFrame()->ToggleSpellCheck();
+}
+
void RenderView::OnDelete() {
if (!webview())
return;
@@ -1951,6 +1959,8 @@
params.frame_url = frame_url;
params.selection_text = selection_text;
params.misspelled_word = misspelled_word;
+ params.spellcheck_enabled =
+ webview->GetFocusedFrame()->SpellCheckEnabled();
params.edit_flags = edit_flags;
params.security_info = security_info;
Send(new ViewHostMsg_ContextMenu(routing_id_, params));

Powered by Google App Engine
This is Rietveld 408576698