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

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 2089933002: Context Menu Refactor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing nits Created 4 years, 6 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/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index 7d636b6f9cd372551f017f41d54572848b612c65..58c76e19d5efb910e083c1f80faacce9ae90c28f 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -653,9 +653,8 @@ void ContentViewCoreImpl::OnSelectionChanged(const std::string& text) {
Java_ContentViewCore_onSelectionChanged(env, obj.obj(), jtext.obj());
}
-void ContentViewCoreImpl::OnSelectionEvent(ui::SelectionEventType event,
- const gfx::PointF& selection_anchor,
- const gfx::RectF& selection_rect) {
+void ContentViewCoreImpl::OnSelectionEvent(
+ ui::SelectionEventType event, const gfx::PointF& selection_anchor) {
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> j_obj = java_ref_.get(env);
if (j_obj.is_null())
@@ -663,27 +662,9 @@ void ContentViewCoreImpl::OnSelectionEvent(ui::SelectionEventType event,
gfx::PointF selection_anchor_pix =
gfx::ScalePoint(selection_anchor, dpi_scale());
- gfx::RectF selection_rect_pix = gfx::ScaleRect(selection_rect, dpi_scale());
Java_ContentViewCore_onSelectionEvent(
env, j_obj.obj(), event, selection_anchor_pix.x(),
- selection_anchor_pix.y(), selection_rect_pix.x(), selection_rect_pix.y(),
- selection_rect_pix.right(), selection_rect_pix.bottom());
-}
-
-bool ContentViewCoreImpl::ShowPastePopup(int x_dip, int y_dip) {
- RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid();
- if (!view)
- return false;
-
- view->OnShowingPastePopup(gfx::PointF(x_dip, y_dip));
-
- JNIEnv* env = AttachCurrentThread();
- ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
- if (obj.is_null())
- return false;
- return Java_ContentViewCore_showPastePopupWithFeedback(
- env, obj.obj(), static_cast<jint>(x_dip * dpi_scale()),
- static_cast<jint>(y_dip * dpi_scale()));
+ selection_anchor_pix.y());
}
void ContentViewCoreImpl::StartContentIntent(const GURL& content_url,

Powered by Google App Engine
This is Rietveld 408576698