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

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

Issue 249613002: [DevTools] Interactive test for DevTools touch emulation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DCHECK Created 6 years, 8 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 | « 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 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 InitGestureDetectors(config); 515 InitGestureDetectors(config);
516 } 516 }
517 517
518 GestureProvider::~GestureProvider() {} 518 GestureProvider::~GestureProvider() {}
519 519
520 bool GestureProvider::OnTouchEvent(const MotionEvent& event) { 520 bool GestureProvider::OnTouchEvent(const MotionEvent& event) {
521 TRACE_EVENT1("input", "GestureProvider::OnTouchEvent", 521 TRACE_EVENT1("input", "GestureProvider::OnTouchEvent",
522 "action", GetMotionEventActionName(event.GetAction())); 522 "action", GetMotionEventActionName(event.GetAction()));
523 523
524 DCHECK_NE(0u, event.GetPointerCount()); 524 DCHECK_NE(0u, event.GetPointerCount());
525 DCHECK(event.GetEventTime() != base::TimeTicks());
jdduke (slow) 2014/04/24 14:52:39 Of course, yeah |DCHECK(!event.GetEventTime().is_n
525 526
526 if (!CanHandle(event)) 527 if (!CanHandle(event))
527 return false; 528 return false;
528 529
529 const bool in_scale_gesture = 530 const bool in_scale_gesture =
530 scale_gesture_listener_->IsScaleGestureDetectionInProgress(); 531 scale_gesture_listener_->IsScaleGestureDetectionInProgress();
531 532
532 OnTouchEventHandlingBegin(event); 533 OnTouchEventHandlingBegin(event);
533 gesture_listener_->OnTouchEvent(event, in_scale_gesture); 534 gesture_listener_->OnTouchEvent(event, in_scale_gesture);
534 scale_gesture_listener_->OnTouchEvent(event); 535 scale_gesture_listener_->OnTouchEvent(event);
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 if (current_down_event_) 747 if (current_down_event_)
747 return; 748 return;
748 749
749 const bool double_tap_enabled = double_tap_support_for_page_ && 750 const bool double_tap_enabled = double_tap_support_for_page_ &&
750 double_tap_support_for_platform_; 751 double_tap_support_for_platform_;
751 gesture_listener_->SetDoubleTapEnabled(double_tap_enabled); 752 gesture_listener_->SetDoubleTapEnabled(double_tap_enabled);
752 scale_gesture_listener_->SetDoubleTapEnabled(double_tap_enabled); 753 scale_gesture_listener_->SetDoubleTapEnabled(double_tap_enabled);
753 } 754 }
754 755
755 } // namespace ui 756 } // namespace ui
OLDNEW
« no previous file with comments | « 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