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

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

Issue 1066053002: [Android] Allow custom ActionMode creation via ContentViewClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 8 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 159b69fa4fe935bf3fa8212ffd3c3be1c971ed2e..05519c16d1e7954bb8545d3a6cac7b273ceaa6ce 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -1342,16 +1342,18 @@ void RenderWidgetHostViewAndroid::SelectBetweenCoordinates(
}
void RenderWidgetHostViewAndroid::OnSelectionEvent(
- ui::SelectionEventType event,
- const gfx::PointF& position) {
+ ui::SelectionEventType event) {
DCHECK(content_view_core_);
+ DCHECK(selection_controller_);
// Showing the selection action bar can alter the current View coordinates in
// such a way that the current MotionEvent stream is suddenly shifted in
// space. Avoid the associated scroll jump by pre-emptively cancelling gesture
// detection; scrolling after the selection is activated is unnecessary.
if (event == ui::SelectionEventType::SELECTION_SHOWN)
ResetGestureDetection();
- content_view_core_->OnSelectionEvent(event, position);
+ content_view_core_->OnSelectionEvent(
+ event, selection_controller_->GetStartPosition(),
+ selection_controller_->GetRectBetweenBoundsIncludingHandles());
}
scoped_ptr<ui::TouchHandleDrawable>

Powered by Google App Engine
This is Rietveld 408576698