| 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 const TouchEvent& event, | 245 const TouchEvent& event, |
| 246 ui::EventResult result, | 246 ui::EventResult result, |
| 247 GestureConsumer* consumer) { | 247 GestureConsumer* consumer) { |
| 248 GestureProviderAura* gesture_provider = | 248 GestureProviderAura* gesture_provider = |
| 249 GetGestureProviderForConsumer(consumer); | 249 GetGestureProviderForConsumer(consumer); |
| 250 gesture_provider->OnTouchEventAck(result != ER_UNHANDLED); | 250 gesture_provider->OnTouchEventAck(result != ER_UNHANDLED); |
| 251 return gesture_provider->GetAndResetPendingGestures(); | 251 return gesture_provider->GetAndResetPendingGestures(); |
| 252 } | 252 } |
| 253 | 253 |
| 254 GestureRecognizer::Gestures* GestureRecognizerImpl::ProcessTouchEventOnAsyncAck( | 254 GestureRecognizer::Gestures* GestureRecognizerImpl::ProcessTouchEventOnAsyncAck( |
| 255 const TouchEvent& event, | |
| 256 ui::EventResult result, | 255 ui::EventResult result, |
| 257 GestureConsumer* consumer) { | 256 GestureConsumer* consumer) { |
| 258 if (result & ui::ER_CONSUMED) | 257 if (result & ui::ER_CONSUMED) |
| 259 return NULL; | 258 return NULL; |
| 260 GestureProviderAura* gesture_provider = | 259 GestureProviderAura* gesture_provider = |
| 261 GetGestureProviderForConsumer(consumer); | 260 GetGestureProviderForConsumer(consumer); |
| 262 gesture_provider->OnTouchEventAck(result != ER_UNHANDLED); | 261 gesture_provider->OnTouchEventAck(result != ER_UNHANDLED); |
| 263 return gesture_provider->GetAndResetPendingGestures(); | 262 return gesture_provider->GetAndResetPendingGestures(); |
| 264 } | 263 } |
| 265 | 264 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 std::vector<GestureEventHelper*>::iterator it; | 331 std::vector<GestureEventHelper*>::iterator it; |
| 333 for (it = helpers.begin(); it != helpers.end(); ++it) | 332 for (it = helpers.begin(); it != helpers.end(); ++it) |
| 334 gesture_recognizer->AddGestureEventHelper(*it); | 333 gesture_recognizer->AddGestureEventHelper(*it); |
| 335 | 334 |
| 336 helpers.clear(); | 335 helpers.clear(); |
| 337 g_gesture_recognizer_instance = | 336 g_gesture_recognizer_instance = |
| 338 static_cast<GestureRecognizerImpl*>(gesture_recognizer); | 337 static_cast<GestureRecognizerImpl*>(gesture_recognizer); |
| 339 } | 338 } |
| 340 | 339 |
| 341 } // namespace ui | 340 } // namespace ui |
| OLD | NEW |