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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 903143003: wip: Touch Text Selection Prototypes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@selection_granularity_on_unified
Patch Set: Created 5 years, 10 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
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 45ce54cd2d2963ca77a9b63d9a407ec4c5513274..023d3daa651cdda16272273f7c734cde335e8cfe 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2011,6 +2011,8 @@ blink::WebLocalFrame::TextGranularity WebContentsImpl::ToWebTextGranularity(
return blink::WebLocalFrame::LineGranularity;
case ui::PARAGRAPH_GRANULARITY:
return blink::WebLocalFrame::ParagraphGranularity;
+ default:
+ return blink::WebLocalFrame::CharacterGranularity;
}
}
@@ -3285,7 +3287,10 @@ void WebContentsImpl::MoveRangeSelectionExtent(
if (!focused_frame)
return;
- //LOG(ERROR) << "WebContentsImpl::MoveRangeSelectionExtent";
+// LOG(ERROR) << "WebContentsImpl::MoveRangeSelectionExtent"
+// << ", extent.x=" << extent.x()
+// << ", extent.y=" << extent.y()
+// << ", granularity=" << ToWebTextGranularity(granularity);
focused_frame->Send(new InputMsg_MoveRangeSelectionExtent(
focused_frame->GetRoutingID(),
extent,
@@ -3298,7 +3303,12 @@ void WebContentsImpl::SelectRange(const gfx::Point& base,
if (!focused_frame)
return;
- LOG(ERROR) << "WebContentsImpl::SelectRange";
+// LOG(ERROR) << "WebContentsImpl::SelectRange"
+// << ", base.x=" << base.x()
+// << ", base.y=" << base.y()
+// << ", extent.x=" << extent.x()
+// << ", extent.y=" << extent.y();
+
focused_frame->Send(
new InputMsg_SelectRange(focused_frame->GetRoutingID(), base, extent));
}
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698