From 3fec83dd87b54f18feb29759a4915948200fa84e Mon Sep 17 00:00:00 2001 From: "sky@chromium.org" Date: Mon, 14 May 2012 16:01:16 +0000 Subject: Revert 136877 - Changes RootWindow capture code so that we only have one capture type. Makes gesture generated mouse events use the right mouse generating code so that we generate the correct enter/exit/moved events and update the appropriate state. BUG=115684 TEST=covered by unit tests R=sadrul@chromium.org Review URL: https://chromiumcodereview.appspot.com/10391079 TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/10310146 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136878 0039d316-1c4b-4281-b951-d872f2087c98 --- ui/base/events.h | 5 +++++ ui/base/gestures/gesture_recognizer_impl.cc | 4 ++-- ui/base/gestures/gesture_types.h | 3 --- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'ui/base') diff --git a/ui/base/events.h b/ui/base/events.h index e0e712d..1bf5ec4 100644 --- a/ui/base/events.h +++ b/ui/base/events.h @@ -105,6 +105,11 @@ enum TouchStatus { // handler. }; +enum CaptureEventFlags { + CW_LOCK_MOUSE = 1 << 0, + CW_LOCK_TOUCH = 1 << 1, +}; + // Updates the list of devices for cached properties. UI_EXPORT void UpdateDeviceList(); diff --git a/ui/base/gestures/gesture_recognizer_impl.cc b/ui/base/gestures/gesture_recognizer_impl.cc index bd29c46..ead6aa0 100644 --- a/ui/base/gestures/gesture_recognizer_impl.cc +++ b/ui/base/gestures/gesture_recognizer_impl.cc @@ -95,7 +95,7 @@ GestureRecognizerImpl::~GestureRecognizerImpl() { } GestureConsumer* GestureRecognizerImpl::GetTouchLockedTarget( - TouchEvent* event) { + TouchEvent* event) { return touch_id_target_[event->GetTouchId()]; } @@ -120,7 +120,7 @@ GestureConsumer* GestureRecognizerImpl::GetTargetForLocation( gfx::Point delta = points[j].last_touch_position().Subtract(location); int distance = delta.x() * delta.x() + delta.y() * delta.y(); - if (!closest_point || distance < closest_distance_squared) { + if ( !closest_point || distance < closest_distance_squared ) { closest_point = &points[j]; closest_distance_squared = distance; } diff --git a/ui/base/gestures/gesture_types.h b/ui/base/gestures/gesture_types.h index 7ed5a86..b857171 100644 --- a/ui/base/gestures/gesture_types.h +++ b/ui/base/gestures/gesture_types.h @@ -51,9 +51,6 @@ class UI_EXPORT GestureConsumer { } virtual ~GestureConsumer() {} - - // TODO: this is a hack! GestureRecognizer should never expose the internal - // marker object that implements this. bool ignores_events() { return ignores_events_; } private: -- cgit v1.1