| OLD | NEW |
| 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_recognizer_impl.h" | 5 #include "ui/events/gestures/gesture_recognizer_impl.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 void GestureRecognizerImpl::DispatchGestureEvent(GestureEvent* event) { | 232 void GestureRecognizerImpl::DispatchGestureEvent(GestureEvent* event) { |
| 233 GestureConsumer* consumer = GetTargetForGestureEvent(*event); | 233 GestureConsumer* consumer = GetTargetForGestureEvent(*event); |
| 234 if (consumer) { | 234 if (consumer) { |
| 235 GestureEventHelper* helper = FindDispatchHelperForConsumer(consumer); | 235 GestureEventHelper* helper = FindDispatchHelperForConsumer(consumer); |
| 236 if (helper) | 236 if (helper) |
| 237 helper->DispatchGestureEvent(event); | 237 helper->DispatchGestureEvent(event); |
| 238 } | 238 } |
| 239 } | 239 } |
| 240 | 240 |
| 241 bool GestureRecognizerImpl::ProcessTouchEventPreDispatch( | 241 bool GestureRecognizerImpl::ProcessTouchEventPreDispatch( |
| 242 const TouchEvent& event, | 242 TouchEvent* event, |
| 243 GestureConsumer* consumer) { | 243 GestureConsumer* consumer) { |
| 244 SetupTargets(event, consumer); | 244 SetupTargets(*event, consumer); |
| 245 | 245 |
| 246 if (event.result() & ER_CONSUMED) | 246 if (event->result() & ER_CONSUMED) |
| 247 return false; | 247 return false; |
| 248 | 248 |
| 249 GestureProviderAura* gesture_provider = | 249 GestureProviderAura* gesture_provider = |
| 250 GetGestureProviderForConsumer(consumer); | 250 GetGestureProviderForConsumer(consumer); |
| 251 return gesture_provider->OnTouchEvent(event); | 251 return gesture_provider->OnTouchEvent(event); |
| 252 } | 252 } |
| 253 | 253 |
| 254 GestureRecognizer::Gestures* | 254 GestureRecognizer::Gestures* |
| 255 GestureRecognizerImpl::AckAsyncTouchEvent( | 255 GestureRecognizerImpl::AckAsyncTouchEvent( |
| 256 const TouchEvent& event, | 256 const TouchEvent& event, |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 std::vector<GestureEventHelper*>::iterator it; | 342 std::vector<GestureEventHelper*>::iterator it; |
| 343 for (it = helpers.begin(); it != helpers.end(); ++it) | 343 for (it = helpers.begin(); it != helpers.end(); ++it) |
| 344 gesture_recognizer->AddGestureEventHelper(*it); | 344 gesture_recognizer->AddGestureEventHelper(*it); |
| 345 | 345 |
| 346 helpers.clear(); | 346 helpers.clear(); |
| 347 g_gesture_recognizer_instance = | 347 g_gesture_recognizer_instance = |
| 348 static_cast<GestureRecognizerImpl*>(gesture_recognizer); | 348 static_cast<GestureRecognizerImpl*>(gesture_recognizer); |
| 349 } | 349 } |
| 350 | 350 |
| 351 } // namespace ui | 351 } // namespace ui |
| OLD | NEW |