| 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 3c197c9f4e8a5fedfcb1636b3a61407c442caa82..4d0426f013e192bd78215a1f451864f963ecd3f5 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_android.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_view_android.cc
|
| @@ -45,7 +45,6 @@
|
| #include "content/browser/renderer_host/dip_util.h"
|
| #include "content/browser/renderer_host/image_transport_factory_android.h"
|
| #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h"
|
| -#include "content/browser/renderer_host/input/touch_selection_controller.h"
|
| #include "content/browser/renderer_host/input/web_input_event_builders_android.h"
|
| #include "content/browser/renderer_host/input/web_input_event_util.h"
|
| #include "content/browser/renderer_host/render_process_host_impl.h"
|
| @@ -77,6 +76,7 @@
|
| #include "ui/gfx/geometry/dip_util.h"
|
| #include "ui/gfx/screen.h"
|
| #include "ui/gfx/size_conversions.h"
|
| +#include "ui/touch_selection/touch_selection_controller.h"
|
|
|
| namespace content {
|
|
|
| @@ -137,14 +137,14 @@ ui::LatencyInfo CreateLatencyInfo(const blink::WebInputEvent& event) {
|
| return latency_info;
|
| }
|
|
|
| -scoped_ptr<TouchSelectionController> CreateSelectionController(
|
| - TouchSelectionControllerClient* client,
|
| +scoped_ptr<ui::TouchSelectionController> CreateSelectionController(
|
| + ui::TouchSelectionControllerClient* client,
|
| ContentViewCore* content_view_core) {
|
| DCHECK(client);
|
| DCHECK(content_view_core);
|
| int tap_timeout_ms = gfx::ViewConfiguration::GetTapTimeoutInMs();
|
| int touch_slop_pixels = gfx::ViewConfiguration::GetTouchSlopInPixels();
|
| - return make_scoped_ptr(new TouchSelectionController(
|
| + return make_scoped_ptr(new ui::TouchSelectionController(
|
| client,
|
| base::TimeDelta::FromMilliseconds(tap_timeout_ms),
|
| touch_slop_pixels / content_view_core->GetDpiScale()));
|
| @@ -1109,24 +1109,25 @@ void RenderWidgetHostViewAndroid::SelectBetweenCoordinates(
|
| }
|
|
|
| void RenderWidgetHostViewAndroid::OnSelectionEvent(
|
| - SelectionEventType event,
|
| + ui::SelectionEventType event,
|
| const gfx::PointF& position) {
|
| DCHECK(content_view_core_);
|
| // 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 == SelectionEventType::SELECTION_SHOWN)
|
| + if (event == ui::SelectionEventType::SELECTION_SHOWN)
|
| ResetGestureDetection();
|
| content_view_core_->OnSelectionEvent(event, position);
|
| }
|
|
|
| -scoped_ptr<TouchHandleDrawable> RenderWidgetHostViewAndroid::CreateDrawable() {
|
| +scoped_ptr<ui::TouchHandleDrawable>
|
| +RenderWidgetHostViewAndroid::CreateDrawable() {
|
| DCHECK(content_view_core_);
|
| if (using_synchronous_compositor_)
|
| return content_view_core_->CreatePopupTouchHandleDrawable();
|
|
|
| - return scoped_ptr<TouchHandleDrawable>(new CompositedTouchHandleDrawable(
|
| + return scoped_ptr<ui::TouchHandleDrawable>(new CompositedTouchHandleDrawable(
|
| content_view_core_->GetLayer().get(),
|
| content_view_core_->GetDpiScale(),
|
| // Use the activity context (instead of the application context) to ensure
|
| @@ -1180,7 +1181,8 @@ void RenderWidgetHostViewAndroid::OnFrameMetadataUpdated(
|
|
|
| if (selection_controller_) {
|
| selection_controller_->OnSelectionBoundsChanged(
|
| - frame_metadata.selection_start, frame_metadata.selection_end);
|
| + ui::SelectionBound(frame_metadata.selection_start),
|
| + ui::SelectionBound(frame_metadata.selection_end));
|
| }
|
|
|
| // All offsets and sizes are in CSS pixels.
|
|
|