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

Side by Side Diff: ui/events/gestures/gesture_sequence.cc

Issue 132123004: Target touches to the correct display. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/events/gestures/gesture_recognizer_impl.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/gestures/gesture_sequence.h" 5 #include "ui/events/gestures/gesture_sequence.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 // finger without either a RELEASE or CANCEL in between. But let's not crash 513 // finger without either a RELEASE or CANCEL in between. But let's not crash
514 // in a release build. 514 // in a release build.
515 if (new_point->in_use()) { 515 if (new_point->in_use()) {
516 LOG(ERROR) << "Received a second press for a point: " << event.touch_id(); 516 LOG(ERROR) << "Received a second press for a point: " << event.touch_id();
517 new_point->ResetVelocity(); 517 new_point->ResetVelocity();
518 new_point->UpdateValues(event); 518 new_point->UpdateValues(event);
519 return NULL; 519 return NULL;
520 } 520 }
521 new_point->set_point_id(point_count_++); 521 new_point->set_point_id(point_count_++);
522 new_point->set_touch_id(event.touch_id()); 522 new_point->set_touch_id(event.touch_id());
523 new_point->set_source_device_id(event.source_device_id());
523 } 524 }
524 525
525 GestureState last_state = state_; 526 GestureState last_state = state_;
526 527
527 // NOTE: when modifying these state transitions, also update gestures.dot 528 // NOTE: when modifying these state transitions, also update gestures.dot
528 scoped_ptr<Gestures> gestures(new Gestures()); 529 scoped_ptr<Gestures> gestures(new Gestures());
529 GesturePoint& point = GesturePointForEvent(event); 530 GesturePoint& point = GesturePointForEvent(event);
530 point.UpdateValues(event); 531 point.UpdateValues(event);
531 RecreateBoundingBox(); 532 RecreateBoundingBox();
532 flags_ = event.flags(); 533 flags_ = event.flags();
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
1439 // Since a timer is running, there should be a non-NULL point. 1440 // Since a timer is running, there should be a non-NULL point.
1440 const GesturePoint* point = GetPointByPointId(0); 1441 const GesturePoint* point = GetPointByPointId(0);
1441 if (!ui::gestures::IsInsideManhattanSquare(point->first_touch_position(), 1442 if (!ui::gestures::IsInsideManhattanSquare(point->first_touch_position(),
1442 event.location())) { 1443 event.location())) {
1443 GetLongPressTimer()->Stop(); 1444 GetLongPressTimer()->Stop();
1444 GetShowPressTimer()->Stop(); 1445 GetShowPressTimer()->Stop();
1445 } 1446 }
1446 } 1447 }
1447 1448
1448 } // namespace ui 1449 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/gestures/gesture_recognizer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698