| Index: content/browser/web_contents/web_contents_view_aura.cc
|
| diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
|
| index 056bb3e3cc38ad5f1ff95e155db4d468ce26633a..30de45378f5c71d3c60180d76bc28691cd2f68b5 100644
|
| --- a/content/browser/web_contents/web_contents_view_aura.cc
|
| +++ b/content/browser/web_contents/web_contents_view_aura.cc
|
| @@ -25,7 +25,6 @@
|
| #include "content/browser/web_contents/aura/overscroll_navigation_overlay.h"
|
| #include "content/browser/web_contents/aura/shadow_layer_delegate.h"
|
| #include "content/browser/web_contents/aura/window_slider.h"
|
| -#include "content/browser/web_contents/touch_editable_impl_aura.h"
|
| #include "content/browser/web_contents/web_contents_impl.h"
|
| #include "content/public/browser/content_browser_client.h"
|
| #include "content/public/browser/notification_observer.h"
|
| @@ -626,8 +625,12 @@ class WebContentsViewAura::WindowObserver
|
| const gfx::Rect& new_bounds) override {
|
| if (window == host_window_ || window == view_->window_) {
|
| SendScreenRects();
|
| - if (view_->touch_editable_)
|
| - view_->touch_editable_->UpdateEditingController();
|
| + if (old_bounds.origin() != new_bounds.origin()) {
|
| + RenderWidgetHostViewAura* rwhv = ToRenderWidgetHostViewAura(
|
| + view_->web_contents_->GetRenderWidgetHostView());
|
| + if (rwhv)
|
| + rwhv->selection_controller()->OnWindowMoved();
|
| + }
|
| #if defined(OS_WIN)
|
| } else {
|
| UpdateConstrainedWindows(NULL);
|
| @@ -753,7 +756,6 @@ WebContentsViewAura::WebContentsViewAura(
|
| overscroll_change_brightness_(false),
|
| current_overscroll_gesture_(OVERSCROLL_NONE),
|
| completed_overscroll_gesture_(OVERSCROLL_NONE),
|
| - touch_editable_(TouchEditableImplAura::Create()),
|
| is_or_was_visible_(false) {
|
| }
|
|
|
| @@ -772,12 +774,6 @@ WebContentsViewAura::~WebContentsViewAura() {
|
| window_.reset();
|
| }
|
|
|
| -void WebContentsViewAura::SetTouchEditableForTest(
|
| - TouchEditableImplAura* touch_editable) {
|
| - touch_editable_.reset(touch_editable);
|
| - AttachTouchEditableToRenderView();
|
| -}
|
| -
|
| void WebContentsViewAura::SizeChangedCommon(const gfx::Size& size) {
|
| if (web_contents_->GetInterstitialPage())
|
| web_contents_->GetInterstitialPage()->SetSize(size);
|
| @@ -991,14 +987,6 @@ void WebContentsViewAura::UpdateOverscrollWindowBrightness(float delta_x) {
|
| window->layer()->SetLayerBrightness(brightness);
|
| }
|
|
|
| -void WebContentsViewAura::AttachTouchEditableToRenderView() {
|
| - if (!touch_editable_)
|
| - return;
|
| - RenderWidgetHostViewAura* rwhva = ToRenderWidgetHostViewAura(
|
| - web_contents_->GetRenderWidgetHostView());
|
| - touch_editable_->AttachToView(rwhva);
|
| -}
|
| -
|
| void WebContentsViewAura::OverscrollUpdateForWebContentsDelegate(
|
| float delta_y) {
|
| if (web_contents_->GetDelegate() && IsScrollEndEffectEnabled())
|
| @@ -1177,7 +1165,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
|
| InstallOverscrollControllerDelegate(view);
|
| }
|
|
|
| - AttachTouchEditableToRenderView();
|
| + //AttachTouchEditableToRenderView();
|
|
|
| #if defined(OS_WIN)
|
| if (legacy_hwnd_)
|
| @@ -1208,7 +1196,7 @@ void WebContentsViewAura::RenderViewCreated(RenderViewHost* host) {
|
| void WebContentsViewAura::RenderViewSwappedIn(RenderViewHost* host) {
|
| if (navigation_overlay_.get() && navigation_overlay_->has_window())
|
| navigation_overlay_->StartObserving();
|
| - AttachTouchEditableToRenderView();
|
| + //AttachTouchEditableToRenderView();
|
| }
|
|
|
| void WebContentsViewAura::SetOverscrollControllerEnabled(bool enabled) {
|
| @@ -1231,9 +1219,10 @@ void WebContentsViewAura::SetOverscrollControllerEnabled(bool enabled) {
|
|
|
| void WebContentsViewAura::ShowContextMenu(RenderFrameHost* render_frame_host,
|
| const ContextMenuParams& params) {
|
| - if (touch_editable_) {
|
| - touch_editable_->EndTouchEditing(false);
|
| - }
|
| + RenderWidgetHostViewAura* rwhv =
|
| + ToRenderWidgetHostViewAura(web_contents_->GetRenderWidgetHostView());
|
| + if (rwhv)
|
| + rwhv->selection_controller()->HideAndDisallowShowingAutomatically();
|
| if (delegate_) {
|
| delegate_->ShowContextMenu(render_frame_host, params);
|
| // WARNING: we may have been deleted during the call to ShowContextMenu().
|
| @@ -1252,8 +1241,10 @@ void WebContentsViewAura::StartDragging(
|
| return;
|
| }
|
|
|
| - if (touch_editable_)
|
| - touch_editable_->EndTouchEditing(false);
|
| + RenderWidgetHostViewAura* rwhv =
|
| + ToRenderWidgetHostViewAura(web_contents_->GetRenderWidgetHostView());
|
| + if (rwhv)
|
| + rwhv->selection_controller()->HideAndDisallowShowingAutomatically();
|
|
|
| ui::OSExchangeData::Provider* provider = ui::OSExchangeData::CreateProvider();
|
| PrepareDragData(drop_data, provider, web_contents_);
|
| @@ -1386,8 +1377,12 @@ void WebContentsViewAura::OnOverscrollModeChange(OverscrollMode old_mode,
|
| if (old_mode == OVERSCROLL_NORTH || old_mode == OVERSCROLL_SOUTH)
|
| OverscrollUpdateForWebContentsDelegate(0);
|
|
|
| - if (new_mode != OVERSCROLL_NONE && touch_editable_)
|
| - touch_editable_->OverscrollStarted();
|
| + if (new_mode != OVERSCROLL_NONE) {
|
| + RenderWidgetHostViewAura* rwhv =
|
| + ToRenderWidgetHostViewAura(web_contents_->GetRenderWidgetHostView());
|
| + if (rwhv)
|
| + rwhv->selection_controller()->OnOverscrollStarted();
|
| + }
|
|
|
| if (new_mode == OVERSCROLL_NONE ||
|
| !GetContentNativeView() ||
|
| @@ -1429,8 +1424,10 @@ void WebContentsViewAura::OnImplicitAnimationsCompleted() {
|
| web_contents_->GetController().GoBack();
|
| PrepareOverscrollNavigationOverlay();
|
| } else {
|
| - if (touch_editable_)
|
| - touch_editable_->OverscrollCompleted();
|
| + RenderWidgetHostViewAura* rwhv =
|
| + ToRenderWidgetHostViewAura(web_contents_->GetRenderWidgetHostView());
|
| + if (rwhv)
|
| + rwhv->selection_controller()->OnOverscrollCompleted();
|
| }
|
|
|
| aura::Window* content = GetContentNativeView();
|
|
|