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

Unified Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 2785853002: Selection Action mode triggered like a context menu (Closed)
Patch Set: fix rebase Created 3 years, 7 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/renderer_host/render_widget_host_view_android.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index 8eb52bedc3979e12a47dd2f562e144e47accf4a4..df540b77d842371527531dfacc65d0ff87b0b054 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -1866,10 +1866,11 @@ void RenderWidgetHostViewAndroid::MoveCaret(const gfx::Point& point) {
host_->MoveCaret(point);
}
-void RenderWidgetHostViewAndroid::ShowContextMenuAtTouchHandle(
- const gfx::Point& point) {
+void RenderWidgetHostViewAndroid::ShowContextMenuAtPoint(
+ const gfx::Point& point,
+ ui::MenuSourceType source_type) {
if (host_)
- host_->ShowContextMenuAtPoint(point, ui::MENU_SOURCE_TOUCH_HANDLE);
+ host_->ShowContextMenuAtPoint(point, source_type);
}
void RenderWidgetHostViewAndroid::DismissTextHandles() {
@@ -2173,6 +2174,10 @@ void RenderWidgetHostViewAndroid::OnStylusSelectUpdate(float x, float y) {
MoveRangeSelectionExtent(gfx::PointF(x, y));
}
+void RenderWidgetHostViewAndroid::OnStylusSelectEnd(float x, float y) {
+ ShowContextMenuAtPoint(gfx::Point(x, y), ui::MENU_SOURCE_STYLUS);
+}
+
void RenderWidgetHostViewAndroid::OnStylusSelectTap(base::TimeTicks time,
float x,
float y) {
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_android.h ('k') | content/browser/web_contents/web_contents_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698