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

Side by Side Diff: ui/events/blink/web_input_event_traits.cc

Issue 2882443002: Tiimer based phase info generated for mouse wheel events. (Closed)
Patch Set: debouncing queue disabled to count sent messages properly Created 3 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ui/events/blink/web_input_event_traits.h" 5 #include "ui/events/blink/web_input_event_traits.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "third_party/WebKit/public/platform/WebGestureEvent.h" 9 #include "third_party/WebKit/public/platform/WebGestureEvent.h"
10 #include "third_party/WebKit/public/platform/WebKeyboardEvent.h" 10 #include "third_party/WebKit/public/platform/WebKeyboardEvent.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 case WebInputEvent::kTouchMove: 213 case WebInputEvent::kTouchMove:
214 // Non-blocking touch moves can be ack'd right away if raf_aligned 214 // Non-blocking touch moves can be ack'd right away if raf_aligned
215 // touch is enabled. 215 // touch is enabled.
216 if (raf_aligned_touch_enabled) { 216 if (raf_aligned_touch_enabled) {
217 return static_cast<const WebTouchEvent&>(event).dispatch_type == 217 return static_cast<const WebTouchEvent&>(event).dispatch_type ==
218 WebInputEvent::kBlocking; 218 WebInputEvent::kBlocking;
219 } 219 }
220 // Touch move events may be non-blocking but are always explicitly 220 // Touch move events may be non-blocking but are always explicitly
221 // acknowledge by the renderer so they block the event stream. 221 // acknowledge by the renderer so they block the event stream.
222 return true; 222 return true;
223
224 case WebInputEvent::kMouseWheel:
225 return static_cast<const WebMouseWheelEvent&>(event).dispatch_type ==
bokan 2017/05/18 16:47:01 How is this related to this change?
sahel 2017/05/18 18:15:15 When a GSB with touch source arrives, we should st
226 WebInputEvent::kBlocking;
227
223 default: 228 default:
224 return true; 229 return true;
225 } 230 }
226 } 231 }
227 232
228 bool WebInputEventTraits::CanCauseScroll( 233 bool WebInputEventTraits::CanCauseScroll(
229 const blink::WebMouseWheelEvent& event) { 234 const blink::WebMouseWheelEvent& event) {
230 #if defined(USE_AURA) 235 #if defined(USE_AURA)
231 // Scroll events generated from the mouse wheel when the control key is held 236 // Scroll events generated from the mouse wheel when the control key is held
232 // don't trigger scrolling. Instead, they may cause zooming. 237 // don't trigger scrolling. Instead, they may cause zooming.
(...skipping 21 matching lines...) Expand all
254 source_event_type = SourceEventType::WHEEL; 259 source_event_type = SourceEventType::WHEEL;
255 } else if (event.source_device == 260 } else if (event.source_device ==
256 blink::WebGestureDevice::kWebGestureDeviceTouchscreen) { 261 blink::WebGestureDevice::kWebGestureDeviceTouchscreen) {
257 source_event_type = SourceEventType::TOUCH; 262 source_event_type = SourceEventType::TOUCH;
258 } 263 }
259 LatencyInfo latency_info(source_event_type); 264 LatencyInfo latency_info(source_event_type);
260 return latency_info; 265 return latency_info;
261 } 266 }
262 267
263 } // namespace ui 268 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698