Index: content/renderer/render_view_impl.cc |
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc |
index b78531b24dcc3d46317e6e1fb898677aa5908944..adae144f7d6ffd390b5edf64d2bac0c7ee9cc437 100644 |
--- a/content/renderer/render_view_impl.cc |
+++ b/content/renderer/render_view_impl.cc |
@@ -761,6 +761,9 @@ void RenderViewImpl::Initialize(RenderViewImplParams* params) { |
if (command_line.HasSwitch(switches::kEnableTouchDragDrop)) |
webview()->settings()->setTouchDragDropEnabled(true); |
+ if (command_line.HasSwitch(switches::kEnableTouchEditing)) |
+ webview()->settings()->setTouchEditingEnabled(true); |
+ |
if (!params->frame_name.empty()) |
webview()->mainFrame()->setName(params->frame_name); |
webview()->settings()->setMinimumTimerInterval( |
@@ -1101,6 +1104,7 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) { |
ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks, |
OnGetSerializedHtmlDataForCurrentPageWithLocalLinks) |
IPC_MESSAGE_HANDLER(ViewMsg_ContextMenuClosed, OnContextMenuClosed) |
+ IPC_MESSAGE_HANDLER(ViewMsg_ShowContextMenu, OnShowContextMenu) |
// TODO(viettrungluu): Move to a separate message filter. |
IPC_MESSAGE_HANDLER(ViewMsg_SetHistoryLengthAndPrune, |
OnSetHistoryLengthAndPrune) |
@@ -4763,6 +4767,7 @@ void RenderViewImpl::SyncSelectionIfRequired() { |
selection_range_ = range; |
Send(new ViewHostMsg_SelectionChanged(routing_id_, text, offset, range)); |
} |
+ UpdateSelectionBounds(); |
} |
GURL RenderViewImpl::GetAlternateErrorPageURL(const GURL& failed_url, |
@@ -6463,6 +6468,11 @@ void RenderViewImpl::OnContextMenuClosed( |
} |
} |
+void RenderViewImpl::OnShowContextMenu() { |
+ if (webview()) |
+ webview()->showContextMenu(); |
+} |
+ |
void RenderViewImpl::OnEnableViewSourceMode() { |
if (!webview()) |
return; |