| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 } // namespace | 58 } // namespace |
| 59 | 59 |
| 60 //////////////////////////////////////////////////////////////////////////////// | 60 //////////////////////////////////////////////////////////////////////////////// |
| 61 // GestureRecognizerImpl, public: | 61 // GestureRecognizerImpl, public: |
| 62 | 62 |
| 63 GestureRecognizerImpl::GestureRecognizerImpl() { | 63 GestureRecognizerImpl::GestureRecognizerImpl() { |
| 64 } | 64 } |
| 65 | 65 |
| 66 GestureRecognizerImpl::~GestureRecognizerImpl() { | 66 GestureRecognizerImpl::~GestureRecognizerImpl() { |
| 67 STLDeleteValues(&consumer_gesture_provider_); | 67 base::STLDeleteValues(&consumer_gesture_provider_); |
| 68 } | 68 } |
| 69 | 69 |
| 70 // Checks if this finger is already down, if so, returns the current target. | 70 // Checks if this finger is already down, if so, returns the current target. |
| 71 // Otherwise, returns NULL. | 71 // Otherwise, returns NULL. |
| 72 GestureConsumer* GestureRecognizerImpl::GetTouchLockedTarget( | 72 GestureConsumer* GestureRecognizerImpl::GetTouchLockedTarget( |
| 73 const TouchEvent& event) { | 73 const TouchEvent& event) { |
| 74 return touch_id_target_[event.touch_id()]; | 74 return touch_id_target_[event.touch_id()]; |
| 75 } | 75 } |
| 76 | 76 |
| 77 GestureConsumer* GestureRecognizerImpl::GetTargetForLocation( | 77 GestureConsumer* GestureRecognizerImpl::GetTargetForLocation( |
| (...skipping 272 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 |