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

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

Issue 1987343002: Drag and drop cleans up touch sequences from the source window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: 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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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