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

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

Issue 2826303003: Let selection events bypass ContentViewCore (Closed)
Patch Set: call Initialize() Created 3 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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_android.h ('k') | content/public/android/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4c3471fde722dc6d7b8a3d9a89cf588eeb55c98c..0fd364e83c9cd10ed8f908427abdfb99613fdd86 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -42,6 +42,7 @@
#include "content/browser/android/content_view_core_impl.h"
#include "content/browser/android/ime_adapter_android.h"
#include "content/browser/android/overscroll_controller_android.h"
+#include "content/browser/android/selection_popup_controller.h"
#include "content/browser/android/synchronous_compositor_host.h"
#include "content/browser/compositor/surface_utils.h"
#include "content/browser/devtools/render_frame_devtools_agent_host.h"
@@ -766,7 +767,7 @@ void RenderWidgetHostViewAndroid::OnTextSelectionChanged(
if (is_in_vr_)
return;
- if (!content_view_core_)
+ if (!selection_popup_controller_)
return;
RenderWidgetHostImpl* focused_widget = GetFocusedWidget();
@@ -776,7 +777,7 @@ void RenderWidgetHostViewAndroid::OnTextSelectionChanged(
const TextInputManager::TextSelection& selection =
*text_input_manager_->GetTextSelection(focused_widget->GetView());
- content_view_core_->OnSelectionChanged(
+ selection_popup_controller_->OnSelectionChanged(
base::UTF16ToUTF8(selection.selected_text()));
}
@@ -1295,7 +1296,7 @@ void RenderWidgetHostViewAndroid::SelectBetweenCoordinates(
void RenderWidgetHostViewAndroid::OnSelectionEvent(
ui::SelectionEventType event) {
- DCHECK(content_view_core_);
+ DCHECK(selection_popup_controller_);
DCHECK(touch_selection_controller_);
// If a selection drag has started, it has taken over the active touch
// sequence. Immediately cancel gesture detection and any downstream touch
@@ -1304,7 +1305,7 @@ void RenderWidgetHostViewAndroid::OnSelectionEvent(
gesture_provider_.GetCurrentDownEvent()) {
ResetGestureDetection();
}
- content_view_core_->OnSelectionEvent(
+ selection_popup_controller_->OnSelectionEvent(
event, touch_selection_controller_->GetStartPosition(),
GetSelectionRect(*touch_selection_controller_));
}
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_android.h ('k') | content/public/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698