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

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

Issue 287153007: Revert 271026 "[DevTools] Interactive test for DevTools touch em..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « trunk/src/content/browser/renderer_host/input/touch_emulator.cc ('k') | no next file » | 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 <cmath> 7 #include <cmath>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 InitGestureDetectors(config); 544 InitGestureDetectors(config);
545 } 545 }
546 546
547 GestureProvider::~GestureProvider() {} 547 GestureProvider::~GestureProvider() {}
548 548
549 bool GestureProvider::OnTouchEvent(const MotionEvent& event) { 549 bool GestureProvider::OnTouchEvent(const MotionEvent& event) {
550 TRACE_EVENT1("input", "GestureProvider::OnTouchEvent", 550 TRACE_EVENT1("input", "GestureProvider::OnTouchEvent",
551 "action", GetMotionEventActionName(event.GetAction())); 551 "action", GetMotionEventActionName(event.GetAction()));
552 552
553 DCHECK_NE(0u, event.GetPointerCount()); 553 DCHECK_NE(0u, event.GetPointerCount());
554 DCHECK(!event.GetEventTime().is_null());
555 554
556 if (!CanHandle(event)) 555 if (!CanHandle(event))
557 return false; 556 return false;
558 557
559 const bool in_scale_gesture = 558 const bool in_scale_gesture =
560 scale_gesture_listener_->IsScaleGestureDetectionInProgress(); 559 scale_gesture_listener_->IsScaleGestureDetectionInProgress();
561 560
562 OnTouchEventHandlingBegin(event); 561 OnTouchEventHandlingBegin(event);
563 gesture_listener_->OnTouchEvent(event, in_scale_gesture); 562 gesture_listener_->OnTouchEvent(event, in_scale_gesture);
564 scale_gesture_listener_->OnTouchEvent(event); 563 scale_gesture_listener_->OnTouchEvent(event);
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 if (current_down_event_) 775 if (current_down_event_)
777 return; 776 return;
778 777
779 const bool double_tap_enabled = double_tap_support_for_page_ && 778 const bool double_tap_enabled = double_tap_support_for_page_ &&
780 double_tap_support_for_platform_; 779 double_tap_support_for_platform_;
781 gesture_listener_->SetDoubleTapEnabled(double_tap_enabled); 780 gesture_listener_->SetDoubleTapEnabled(double_tap_enabled);
782 scale_gesture_listener_->SetDoubleTapEnabled(double_tap_enabled); 781 scale_gesture_listener_->SetDoubleTapEnabled(double_tap_enabled);
783 } 782 }
784 783
785 } // namespace ui 784 } // namespace ui
OLDNEW
« no previous file with comments | « trunk/src/content/browser/renderer_host/input/touch_emulator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698