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

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

Issue 1907323003: Drag and drop cleans up touch sequences from the source window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Mac. Created 4 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
« no previous file with comments | « ui/aura/window_event_dispatcher.cc ('k') | ui/events/gestures/gesture_provider_aura.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « ui/aura/window_event_dispatcher.cc ('k') | ui/events/gestures/gesture_provider_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698