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

Unified Diff: content/renderer/render_view_impl.cc

Issue 222783004: Move textual replacement to WebContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 4a3bd5b1d408d45bc2e8896b42fc6d657d205743..6ecf1ff4cd5c688521098e97e4024797562f66c4 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1071,8 +1071,6 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
IPC_BEGIN_MESSAGE_MAP_EX(RenderViewImpl, message, msg_is_ok)
IPC_MESSAGE_HANDLER(InputMsg_ExecuteEditCommand, OnExecuteEditCommand)
IPC_MESSAGE_HANDLER(InputMsg_MoveCaret, OnMoveCaret)
- IPC_MESSAGE_HANDLER(InputMsg_Replace, OnReplace)
- IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling)
IPC_MESSAGE_HANDLER(InputMsg_ScrollFocusedEditableNodeIntoRect,
OnScrollFocusedEditableNodeIntoRect)
IPC_MESSAGE_HANDLER(InputMsg_SetEditCommandsForNextKeyEvent,
@@ -1254,28 +1252,6 @@ void RenderViewImpl::OnMoveCaret(const gfx::Point& point) {
webview()->focusedFrame()->moveCaretSelection(point);
}
-void RenderViewImpl::OnReplace(const base::string16& text) {
- if (!webview())
- return;
-
- WebFrame* frame = webview()->focusedFrame();
- if (!frame->hasSelection())
- frame->selectWordAroundCaret();
-
- frame->replaceSelection(text);
-}
-
-void RenderViewImpl::OnReplaceMisspelling(const base::string16& text) {
- if (!webview())
- return;
-
- WebFrame* frame = webview()->focusedFrame();
- if (!frame->hasSelection())
- return;
-
- frame->replaceMisspelledRange(text);
-}
-
void RenderViewImpl::OnScrollFocusedEditableNodeIntoRect(
const gfx::Rect& rect) {
if (has_scrolled_focused_editable_node_into_rect_ &&
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698