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

Side by Side Diff: ui/events/gesture_detection/gesture_provider.cc

Issue 1989623002: Suppressed MEs for gestures from cancelled PEs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a comment. Created 4 years, 6 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 "ui/events/gesture_detection/gesture_provider.h" 5 #include "ui/events/gesture_detection/gesture_provider.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 10
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 return GestureEventData(details, 490 return GestureEventData(details,
491 motion_event_id, 491 motion_event_id,
492 primary_tool_type, 492 primary_tool_type,
493 time, 493 time,
494 x, 494 x,
495 y, 495 y,
496 raw_x, 496 raw_x,
497 raw_y, 497 raw_y,
498 touch_point_count, 498 touch_point_count,
499 bounding_box, 499 bounding_box,
500 flags); 500 flags,
501 0U);
501 } 502 }
502 503
503 GestureEventData CreateGesture(EventType type, 504 GestureEventData CreateGesture(EventType type,
504 int motion_event_id, 505 int motion_event_id,
505 MotionEvent::ToolType primary_tool_type, 506 MotionEvent::ToolType primary_tool_type,
506 base::TimeTicks time, 507 base::TimeTicks time,
507 float x, 508 float x,
508 float y, 509 float y,
509 float raw_x, 510 float raw_x,
510 float raw_y, 511 float raw_y,
511 size_t touch_point_count, 512 size_t touch_point_count,
512 const gfx::RectF& bounding_box, 513 const gfx::RectF& bounding_box,
513 int flags) const { 514 int flags) const {
514 return GestureEventData(GestureEventDetails(type), 515 return GestureEventData(GestureEventDetails(type),
515 motion_event_id, 516 motion_event_id,
516 primary_tool_type, 517 primary_tool_type,
517 time, 518 time,
518 x, 519 x,
519 y, 520 y,
520 raw_x, 521 raw_x,
521 raw_y, 522 raw_y,
522 touch_point_count, 523 touch_point_count,
523 bounding_box, 524 bounding_box,
524 flags); 525 flags,
526 0U);
525 } 527 }
526 528
527 GestureEventData CreateGesture(const GestureEventDetails& details, 529 GestureEventData CreateGesture(const GestureEventDetails& details,
528 const MotionEvent& event) const { 530 const MotionEvent& event) const {
529 return GestureEventData(details, 531 return GestureEventData(details,
530 event.GetPointerId(), 532 event.GetPointerId(),
531 event.GetToolType(), 533 event.GetToolType(),
532 event.GetEventTime(), 534 event.GetEventTime(),
533 event.GetX(), 535 event.GetX(),
534 event.GetY(), 536 event.GetY(),
535 event.GetRawX(), 537 event.GetRawX(),
536 event.GetRawY(), 538 event.GetRawY(),
537 event.GetPointerCount(), 539 event.GetPointerCount(),
538 GetBoundingBox(event, details.type()), 540 GetBoundingBox(event, details.type()),
539 event.GetFlags()); 541 event.GetFlags(),
542 0U);
540 } 543 }
541 544
542 GestureEventData CreateGesture(EventType type, 545 GestureEventData CreateGesture(EventType type,
543 const MotionEvent& event) const { 546 const MotionEvent& event) const {
544 return CreateGesture(GestureEventDetails(type), event); 547 return CreateGesture(GestureEventDetails(type), event);
545 } 548 }
546 549
547 GestureEventData CreateTapGesture(EventType type, 550 GestureEventData CreateTapGesture(EventType type,
548 const MotionEvent& event, 551 const MotionEvent& event,
549 int tap_count) const { 552 int tap_count) const {
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 // null'ing of the listener until the sequence has ended. 832 // null'ing of the listener until the sequence has ended.
830 if (current_down_event_) 833 if (current_down_event_)
831 return; 834 return;
832 835
833 const bool double_tap_enabled = 836 const bool double_tap_enabled =
834 double_tap_support_for_page_ && double_tap_support_for_platform_; 837 double_tap_support_for_page_ && double_tap_support_for_platform_;
835 gesture_listener_->SetDoubleTapEnabled(double_tap_enabled); 838 gesture_listener_->SetDoubleTapEnabled(double_tap_enabled);
836 } 839 }
837 840
838 } // namespace ui 841 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698