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

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

Issue 25552003: Enable TouchEvent suppression on scroll for all platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test cleanup 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
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 client_(client), 80 client_(client),
81 ack_handler_(ack_handler), 81 ack_handler_(ack_handler),
82 routing_id_(routing_id), 82 routing_id_(routing_id),
83 select_range_pending_(false), 83 select_range_pending_(false),
84 move_caret_pending_(false), 84 move_caret_pending_(false),
85 mouse_move_pending_(false), 85 mouse_move_pending_(false),
86 mouse_wheel_pending_(false), 86 mouse_wheel_pending_(false),
87 has_touch_handler_(false), 87 has_touch_handler_(false),
88 touch_event_queue_(new TouchEventQueue(this)), 88 touch_event_queue_(new TouchEventQueue(this)),
89 gesture_event_filter_(new GestureEventFilter(this)) { 89 gesture_event_filter_(new GestureEventFilter(this)) {
90 enable_no_touch_to_renderer_while_scrolling_ =
91 CommandLine::ForCurrentProcess()->HasSwitch(
92 switches::kNoTouchToRendererWhileScrolling);
93 DCHECK(process); 90 DCHECK(process);
94 DCHECK(client); 91 DCHECK(client);
95 } 92 }
96 93
97 ImmediateInputRouter::~ImmediateInputRouter() { 94 ImmediateInputRouter::~ImmediateInputRouter() {
98 } 95 }
99 96
100 void ImmediateInputRouter::Flush() { 97 void ImmediateInputRouter::Flush() {
101 NOTREACHED() << "ImmediateInputRouter will never request a flush."; 98 NOTREACHED() << "ImmediateInputRouter will never request a flush.";
102 } 99 }
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 552
556 void ImmediateInputRouter::ProcessTouchAck( 553 void ImmediateInputRouter::ProcessTouchAck(
557 InputEventAckState ack_result, 554 InputEventAckState ack_result,
558 const ui::LatencyInfo& latency_info) { 555 const ui::LatencyInfo& latency_info) {
559 // |touch_event_queue_| will forward to OnTouchEventAck when appropriate. 556 // |touch_event_queue_| will forward to OnTouchEventAck when appropriate.
560 touch_event_queue_->ProcessTouchAck(ack_result, latency_info); 557 touch_event_queue_->ProcessTouchAck(ack_result, latency_info);
561 } 558 }
562 559
563 void ImmediateInputRouter::HandleGestureScroll( 560 void ImmediateInputRouter::HandleGestureScroll(
564 const GestureEventWithLatencyInfo& gesture_event) { 561 const GestureEventWithLatencyInfo& gesture_event) {
565 if (enable_no_touch_to_renderer_while_scrolling_) 562 touch_event_queue_->OnGestureScrollEvent(gesture_event);
566 touch_event_queue_->OnGestureScrollEvent(gesture_event);
567 } 563 }
568 564
569 } // namespace content 565 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698