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

Unified Diff: ui/base/gestures/gesture_recognizer_impl.cc

Issue 10448102: Adds switch to disable generating mouse events from touch events and (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove released and fix bug in GestureRecognizerImpl Created 8 years, 7 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
« no previous file with comments | « ui/base/events.h ('k') | ui/base/gestures/gesture_sequence.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/gestures/gesture_recognizer_impl.cc
diff --git a/ui/base/gestures/gesture_recognizer_impl.cc b/ui/base/gestures/gesture_recognizer_impl.cc
index 5e3e7e9842d2f510a6fa61ba623c4e820c96ddf5..098464773d1d3203a1f5861a8c53b38cc4ad2662 100644
--- a/ui/base/gestures/gesture_recognizer_impl.cc
+++ b/ui/base/gestures/gesture_recognizer_impl.cc
@@ -157,12 +157,13 @@ void GestureRecognizerImpl::CancelNonCapturedTouches(
std::map<int, GestureConsumer*>::iterator i;
// Fire touch cancels, and target touch_ids to gesture_consumer_ignorer.
for (i = touch_id_target_.begin(); i != touch_id_target_.end(); ++i) {
- if (capturer != i->second) {
- scoped_ptr<TouchEvent> touchEvent(helper_->CreateTouchEvent(
+ if (capturer != i->second &&
+ touch_id_target_[i->first] != gesture_consumer_ignorer_.get()) {
+ scoped_ptr<TouchEvent> touch_event(helper_->CreateTouchEvent(
ui::ET_TOUCH_CANCELLED, gfx::Point(0, 0),
i->first,
base::Time::NowFromSystemTime() - base::Time()));
- helper_->DispatchCancelTouchEvent(touchEvent.get());
+ helper_->DispatchCancelTouchEvent(touch_event.get());
touch_id_target_[i->first] = gesture_consumer_ignorer_.get();
}
}
« no previous file with comments | « ui/base/events.h ('k') | ui/base/gestures/gesture_sequence.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698