| OLD | NEW |
| 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 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 } | 695 } |
| 696 | 696 |
| 697 GestureProvider::~GestureProvider() { | 697 GestureProvider::~GestureProvider() { |
| 698 } | 698 } |
| 699 | 699 |
| 700 bool GestureProvider::OnTouchEvent(const MotionEvent& event) { | 700 bool GestureProvider::OnTouchEvent(const MotionEvent& event) { |
| 701 TRACE_EVENT1("input", | 701 TRACE_EVENT1("input", |
| 702 "GestureProvider::OnTouchEvent", | 702 "GestureProvider::OnTouchEvent", |
| 703 "action", | 703 "action", |
| 704 GetMotionEventActionName(event.GetAction())); | 704 GetMotionEventActionName(event.GetAction())); |
| 705 | |
| 706 DCHECK_NE(0u, event.GetPointerCount()); | 705 DCHECK_NE(0u, event.GetPointerCount()); |
| 707 | 706 |
| 708 if (!CanHandle(event)) | 707 if (!CanHandle(event)) |
| 709 return false; | 708 return false; |
| 710 | 709 |
| 711 OnTouchEventHandlingBegin(event); | 710 OnTouchEventHandlingBegin(event); |
| 712 gesture_listener_->OnTouchEvent(event); | 711 gesture_listener_->OnTouchEvent(event); |
| 713 OnTouchEventHandlingEnd(event); | 712 OnTouchEventHandlingEnd(event); |
| 714 uma_histogram_.RecordTouchEvent(event); | 713 uma_histogram_.RecordTouchEvent(event); |
| 715 return true; | 714 return true; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 830 // null'ing of the listener until the sequence has ended. | 829 // null'ing of the listener until the sequence has ended. |
| 831 if (current_down_event_) | 830 if (current_down_event_) |
| 832 return; | 831 return; |
| 833 | 832 |
| 834 const bool double_tap_enabled = | 833 const bool double_tap_enabled = |
| 835 double_tap_support_for_page_ && double_tap_support_for_platform_; | 834 double_tap_support_for_page_ && double_tap_support_for_platform_; |
| 836 gesture_listener_->SetDoubleTapEnabled(double_tap_enabled); | 835 gesture_listener_->SetDoubleTapEnabled(double_tap_enabled); |
| 837 } | 836 } |
| 838 | 837 |
| 839 } // namespace ui | 838 } // namespace ui |
| OLD | NEW |