| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 SetupTargets(*event, consumer); | 266 SetupTargets(*event, consumer); |
| 267 | 267 |
| 268 if (event->result() & ER_CONSUMED) | 268 if (event->result() & ER_CONSUMED) |
| 269 return false; | 269 return false; |
| 270 | 270 |
| 271 GestureProviderAura* gesture_provider = | 271 GestureProviderAura* gesture_provider = |
| 272 GetGestureProviderForConsumer(consumer); | 272 GetGestureProviderForConsumer(consumer); |
| 273 return gesture_provider->OnTouchEvent(event); | 273 return gesture_provider->OnTouchEvent(event); |
| 274 } | 274 } |
| 275 | 275 |
| 276 GestureRecognizer::Gestures* GestureRecognizerImpl::AckTouchEvent( | 276 GestureRecognizer::Gestures GestureRecognizerImpl::AckTouchEvent( |
| 277 uint32_t unique_event_id, | 277 uint32_t unique_event_id, |
| 278 ui::EventResult result, | 278 ui::EventResult result, |
| 279 GestureConsumer* consumer) { | 279 GestureConsumer* consumer) { |
| 280 GestureProviderAura* gesture_provider = | 280 GestureProviderAura* gesture_provider = |
| 281 GetGestureProviderForConsumer(consumer); | 281 GetGestureProviderForConsumer(consumer); |
| 282 gesture_provider->OnTouchEventAck(unique_event_id, result != ER_UNHANDLED); | 282 gesture_provider->OnTouchEventAck(unique_event_id, result != ER_UNHANDLED); |
| 283 return gesture_provider->GetAndResetPendingGestures(); | 283 return gesture_provider->GetAndResetPendingGestures(); |
| 284 } | 284 } |
| 285 | 285 |
| 286 bool GestureRecognizerImpl::CleanupStateForConsumer( | 286 bool GestureRecognizerImpl::CleanupStateForConsumer( |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 std::vector<GestureEventHelper*>::iterator it; | 350 std::vector<GestureEventHelper*>::iterator it; |
| 351 for (it = helpers.begin(); it != helpers.end(); ++it) | 351 for (it = helpers.begin(); it != helpers.end(); ++it) |
| 352 gesture_recognizer->AddGestureEventHelper(*it); | 352 gesture_recognizer->AddGestureEventHelper(*it); |
| 353 | 353 |
| 354 helpers.clear(); | 354 helpers.clear(); |
| 355 g_gesture_recognizer_instance = | 355 g_gesture_recognizer_instance = |
| 356 static_cast<GestureRecognizerImpl*>(gesture_recognizer); | 356 static_cast<GestureRecognizerImpl*>(gesture_recognizer); |
| 357 } | 357 } |
| 358 | 358 |
| 359 } // namespace ui | 359 } // namespace ui |
| OLD | NEW |