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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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, | |
257 ui::EventResult result, | 256 ui::EventResult result, |
258 GestureConsumer* consumer) { | 257 GestureConsumer* consumer) { |
259 GestureProviderAura* gesture_provider = | 258 GestureProviderAura* gesture_provider = |
260 GetGestureProviderForConsumer(consumer); | 259 GetGestureProviderForConsumer(consumer); |
261 gesture_provider->OnAsyncTouchEventAck(result != ER_UNHANDLED); | 260 gesture_provider->OnAsyncTouchEventAck(result != ER_UNHANDLED); |
262 return gesture_provider->GetAndResetPendingGestures(); | 261 return gesture_provider->GetAndResetPendingGestures(); |
263 } | 262 } |
264 | 263 |
265 GestureRecognizer::Gestures* GestureRecognizerImpl::AckSyncTouchEvent( | 264 GestureRecognizer::Gestures* GestureRecognizerImpl::AckSyncTouchEvent( |
266 const uint64 unique_event_id, | 265 const uint64 unique_event_id, |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 std::vector<GestureEventHelper*>::iterator it; | 341 std::vector<GestureEventHelper*>::iterator it; |
343 for (it = helpers.begin(); it != helpers.end(); ++it) | 342 for (it = helpers.begin(); it != helpers.end(); ++it) |
344 gesture_recognizer->AddGestureEventHelper(*it); | 343 gesture_recognizer->AddGestureEventHelper(*it); |
345 | 344 |
346 helpers.clear(); | 345 helpers.clear(); |
347 g_gesture_recognizer_instance = | 346 g_gesture_recognizer_instance = |
348 static_cast<GestureRecognizerImpl*>(gesture_recognizer); | 347 static_cast<GestureRecognizerImpl*>(gesture_recognizer); |
349 } | 348 } |
350 | 349 |
351 } // namespace ui | 350 } // namespace ui |
OLD | NEW |