summaryrefslogtreecommitdiffstats
path: root/ui/base/gestures
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-15 00:16:59 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-15 00:16:59 +0000
commita8dffcec83c5eba7b9f17b03e0e35f28b44a8d52 (patch)
tree27e7dc26d245d83d5a8b81318d236d19e0ae0c21 /ui/base/gestures
parent06ea3e51e4ca77a6e16f549eff9094c472786f91 (diff)
downloadchromium_src-a8dffcec83c5eba7b9f17b03e0e35f28b44a8d52.zip
chromium_src-a8dffcec83c5eba7b9f17b03e0e35f28b44a8d52.tar.gz
chromium_src-a8dffcec83c5eba7b9f17b03e0e35f28b44a8d52.tar.bz2
Take 2 at: 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 TBR=sadrul@chromium.org Review URL: https://chromiumcodereview.appspot.com/10332141 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137030 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/gestures')
-rw-r--r--ui/base/gestures/gesture_recognizer_impl.cc4
-rw-r--r--ui/base/gestures/gesture_types.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/ui/base/gestures/gesture_recognizer_impl.cc b/ui/base/gestures/gesture_recognizer_impl.cc
index ead6aa0..bd29c46 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 b857171..7ed5a86 100644
--- a/ui/base/gestures/gesture_types.h
+++ b/ui/base/gestures/gesture_types.h
@@ -51,6 +51,9 @@ 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: