| Index: content/browser/renderer_host/render_widget_host_impl.cc
|
| diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
| index c20ad5d2e0ca13e1caa529cf25348c6c39f595b6..26e45758fa157832fe783ef8307e0955642afd6b 100644
|
| --- a/content/browser/renderer_host/render_widget_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
| @@ -38,7 +38,6 @@
|
| #include "content/browser/renderer_host/input/synthetic_gesture_target.h"
|
| #include "content/browser/renderer_host/input/timeout_monitor.h"
|
| #include "content/browser/renderer_host/input/touch_emulator.h"
|
| -#include "content/browser/renderer_host/overscroll_controller.h"
|
| #include "content/browser/renderer_host/render_process_host_impl.h"
|
| #include "content/browser/renderer_host/render_view_host_impl.h"
|
| #include "content/browser/renderer_host/render_widget_helper.h"
|
| @@ -232,12 +231,6 @@ RenderWidgetHostImpl::RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate,
|
|
|
| touch_emulator_.reset();
|
|
|
| -#if defined(USE_AURA)
|
| - bool overscroll_enabled = CommandLine::ForCurrentProcess()->
|
| - GetSwitchValueASCII(switches::kOverscrollHistoryNavigation) != "0";
|
| - SetOverscrollControllerEnabled(overscroll_enabled);
|
| -#endif
|
| -
|
| if (GetProcess()->IsGuest() || !CommandLine::ForCurrentProcess()->HasSwitch(
|
| switches::kDisableHangMonitor)) {
|
| hang_monitor_timeout_.reset(new TimeoutMonitor(
|
| @@ -390,13 +383,6 @@ void RenderWidgetHostImpl::SendScreenRects() {
|
| waiting_for_screen_rects_ack_ = true;
|
| }
|
|
|
| -void RenderWidgetHostImpl::SetOverscrollControllerEnabled(bool enabled) {
|
| - if (!enabled)
|
| - overscroll_controller_.reset();
|
| - else if (!overscroll_controller_)
|
| - overscroll_controller_.reset(new OverscrollController());
|
| -}
|
| -
|
| void RenderWidgetHostImpl::SuppressNextCharEvents() {
|
| suppress_next_char_events_ = true;
|
| }
|
| @@ -647,10 +633,6 @@ void RenderWidgetHostImpl::Blur() {
|
| if (IsMouseLocked())
|
| view_->UnlockMouse();
|
|
|
| - // If there is a pending overscroll, then that should be cancelled.
|
| - if (overscroll_controller_)
|
| - overscroll_controller_->Cancel();
|
| -
|
| if (touch_emulator_)
|
| touch_emulator_->CancelTouch();
|
|
|
| @@ -1207,10 +1189,7 @@ void RenderWidgetHostImpl::RendererExited(base::TerminationStatus status,
|
| input_router_.reset(new InputRouterImpl(
|
| process_, this, this, routing_id_, GetInputRouterConfigForPlatform()));
|
|
|
| - if (overscroll_controller_)
|
| - overscroll_controller_->Reset();
|
| -
|
| - // Must reset these to ensure that keyboard events work with a new renderer.
|
| + // Must reset these to ensure that keyboard events work with a new renderer.
|
| suppress_next_char_events_ = false;
|
|
|
| // Reset some fields in preparation for recovering from a crash.
|
| @@ -1806,7 +1785,7 @@ void RenderWidgetHostImpl::IncrementInFlightEventCount() {
|
| }
|
|
|
| void RenderWidgetHostImpl::DecrementInFlightEventCount() {
|
| - DCHECK(in_flight_event_count_ >= 0);
|
| + DCHECK_GT(in_flight_event_count_, 0);
|
| // Cancel pending hung renderer checks since the renderer is responsive.
|
| if (decrement_in_flight_event_count() <= 0)
|
| StopHangMonitorTimeout();
|
| @@ -1816,10 +1795,6 @@ void RenderWidgetHostImpl::OnHasTouchEventHandlers(bool has_handlers) {
|
| has_touch_handler_ = has_handlers;
|
| }
|
|
|
| -OverscrollController* RenderWidgetHostImpl::GetOverscrollController() const {
|
| - return overscroll_controller_.get();
|
| -}
|
| -
|
| void RenderWidgetHostImpl::DidFlush() {
|
| if (synthetic_gesture_controller_)
|
| synthetic_gesture_controller_->OnDidFlushInput();
|
| @@ -1865,10 +1840,12 @@ void RenderWidgetHostImpl::OnWheelEventAck(
|
| ui::INPUT_EVENT_LATENCY_TERMINATED_MOUSE_COMPONENT, 0, 0);
|
| }
|
|
|
| - const bool processed = (INPUT_EVENT_ACK_STATE_CONSUMED == ack_result);
|
| - if (!processed && !is_hidden() && view_) {
|
| - if (!delegate_->HandleWheelEvent(wheel_event.event))
|
| - view_->UnhandledWheelEvent(wheel_event.event);
|
| + if (!is_hidden() && view_) {
|
| + if (ack_result != INPUT_EVENT_ACK_STATE_CONSUMED &&
|
| + delegate_->HandleWheelEvent(wheel_event.event)) {
|
| + ack_result = INPUT_EVENT_ACK_STATE_CONSUMED;
|
| + }
|
| + view_->WheelEventAck(wheel_event.event, ack_result);
|
| }
|
| }
|
|
|
|
|