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