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

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

Issue 1645613007: Redefined the bit WebTouchEvent.causesScrollingIfUncanceled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed an aura unittest. Created 4 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/touch_emulator.h" 5 #include "content/browser/renderer_host/input/touch_emulator.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "content/browser/renderer_host/input/motion_event_web.h" 8 #include "content/browser/renderer_host/input/motion_event_web.h"
9 #include "content/browser/renderer_host/input/web_input_event_util.h" 9 #include "content/browser/renderer_host/input/web_input_event_util.h"
10 #include "content/common/input/web_touch_event_traits.h" 10 #include "content/common/input/web_touch_event_traits.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 // Do not allow middle-sequence event to pass through, if start was blocked. 243 // Do not allow middle-sequence event to pass through, if start was blocked.
244 if (!emulated_stream_active_sequence_count_ && !is_sequence_start) { 244 if (!emulated_stream_active_sequence_count_ && !is_sequence_start) {
245 gesture_provider_->OnTouchEventAck(event.uniqueTouchEventId, 245 gesture_provider_->OnTouchEventAck(event.uniqueTouchEventId,
246 event_consumed); 246 event_consumed);
247 return; 247 return;
248 } 248 }
249 249
250 if (is_sequence_start) 250 if (is_sequence_start)
251 emulated_stream_active_sequence_count_++; 251 emulated_stream_active_sequence_count_++;
252 252
253 event.causesScrollingIfUncanceled = result.did_generate_scroll; 253 event.movedBeyondSlopRegion = result.moved_beyond_slop_region;
254 client_->ForwardEmulatedTouchEvent(event); 254 client_->ForwardEmulatedTouchEvent(event);
255 } 255 }
256 256
257 bool TouchEmulator::HandleTouchEventAck( 257 bool TouchEmulator::HandleTouchEventAck(
258 const blink::WebTouchEvent& event, InputEventAckState ack_result) { 258 const blink::WebTouchEvent& event, InputEventAckState ack_result) {
259 bool is_sequence_end = WebTouchEventTraits::IsTouchSequenceEnd(event); 259 bool is_sequence_end = WebTouchEventTraits::IsTouchSequenceEnd(event);
260 if (emulated_stream_active_sequence_count_) { 260 if (emulated_stream_active_sequence_count_) {
261 if (is_sequence_end) 261 if (is_sequence_end)
262 emulated_stream_active_sequence_count_--; 262 emulated_stream_active_sequence_count_--;
263 263
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 point.screenPosition.y = mouse_event.globalY; 449 point.screenPosition.y = mouse_event.globalY;
450 point.tiltX = 0; 450 point.tiltX = 0;
451 point.tiltY = 0; 451 point.tiltY = 0;
452 } 452 }
453 453
454 bool TouchEmulator::InPinchGestureMode() const { 454 bool TouchEmulator::InPinchGestureMode() const {
455 return shift_pressed_; 455 return shift_pressed_;
456 } 456 }
457 457
458 } // namespace content 458 } // namespace content
OLDNEW
« no previous file with comments | « components/test_runner/event_sender.cc ('k') | content/browser/renderer_host/input/touch_event_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698