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

Unified Diff: trunk/src/ui/events/gestures/gesture_recognizer_impl.cc

Issue 132363004: Revert 243974 "Target touches to the correct display." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: trunk/src/ui/events/gestures/gesture_recognizer_impl.cc
===================================================================
--- trunk/src/ui/events/gestures/gesture_recognizer_impl.cc (revision 244019)
+++ trunk/src/ui/events/gestures/gesture_recognizer_impl.cc (working copy)
@@ -78,17 +78,15 @@
}
GestureConsumer* GestureRecognizerImpl::GetTargetForLocation(
- const gfx::Point& location, int source_device_id) {
+ const gfx::Point& location) {
const GesturePoint* closest_point = NULL;
int64 closest_distance_squared = 0;
std::map<GestureConsumer*, GestureSequence*>::iterator i;
for (i = consumer_sequence_.begin(); i != consumer_sequence_.end(); ++i) {
const GesturePoint* points = i->second->points();
for (int j = 0; j < GestureSequence::kMaxGesturePoints; ++j) {
- if (!points[j].in_use() ||
- source_device_id != points[j].source_device_id()) {
+ if (!points[j].in_use())
continue;
- }
gfx::Vector2d delta = points[j].last_touch_position() - location;
// Relative distance is all we need here, so LengthSquared() is
// appropriate, and cheaper than Length().
@@ -273,11 +271,6 @@
return g_gesture_recognizer_instance;
}
-// GestureRecognizer, static
-void GestureRecognizer::Reset() {
- g_gesture_recognizer_instance = NULL;
-}
-
void SetGestureRecognizerForTesting(GestureRecognizer* gesture_recognizer) {
// Transfer helpers to the new GR.
std::vector<GestureEventHelper*>& helpers =
« no previous file with comments | « trunk/src/ui/events/gestures/gesture_recognizer_impl.h ('k') | trunk/src/ui/events/gestures/gesture_sequence.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698