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

Side by Side Diff: content/browser/renderer_host/input/immediate_input_router.cc

Issue 23856016: Send touch cancel to renderer when scrolling starts (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 7 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/input/immediate_input_router_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/input/immediate_input_router.h" 5 #include "content/browser/renderer_host/input/immediate_input_router.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "content/browser/renderer_host/input/gesture_event_filter.h" 9 #include "content/browser/renderer_host/input/gesture_event_filter.h"
10 #include "content/browser/renderer_host/input/input_ack_handler.h" 10 #include "content/browser/renderer_host/input/input_ack_handler.h"
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 551
552 void ImmediateInputRouter::ProcessTouchAck( 552 void ImmediateInputRouter::ProcessTouchAck(
553 InputEventAckState ack_result, 553 InputEventAckState ack_result,
554 const ui::LatencyInfo& latency_info) { 554 const ui::LatencyInfo& latency_info) {
555 // |touch_event_queue_| will forward to OnTouchEventAck when appropriate. 555 // |touch_event_queue_| will forward to OnTouchEventAck when appropriate.
556 touch_event_queue_->ProcessTouchAck(ack_result, latency_info); 556 touch_event_queue_->ProcessTouchAck(ack_result, latency_info);
557 } 557 }
558 558
559 void ImmediateInputRouter::HandleGestureScroll( 559 void ImmediateInputRouter::HandleGestureScroll(
560 const GestureEventWithLatencyInfo& gesture_event) { 560 const GestureEventWithLatencyInfo& gesture_event) {
561 if (!enable_no_touch_to_renderer_while_scrolling_) 561 if (enable_no_touch_to_renderer_while_scrolling_)
562 return; 562 touch_event_queue_->OnGestureScrollEvent(gesture_event);
563
564 // Once scrolling is started stop forwarding touch move events to renderer.
565 if (gesture_event.event.type == WebInputEvent::GestureScrollBegin)
566 touch_event_queue_->set_no_touch_move_to_renderer(true);
567
568 if (gesture_event.event.type == WebInputEvent::GestureScrollEnd ||
569 gesture_event.event.type == WebInputEvent::GestureFlingStart) {
570 touch_event_queue_->set_no_touch_move_to_renderer(false);
571 }
572 } 563 }
573 564
574 } // namespace content 565 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/input/immediate_input_router_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698