| 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/base/gestures/gesture_recognizer_impl.h" | 5 #include "ui/base/gestures/gesture_recognizer_impl.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "ui/base/event.h" | 10 #include "ui/base/event.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 private: | 31 private: |
| 32 std::queue<TouchEvent*>* queue_; | 32 std::queue<TouchEvent*>* queue_; |
| 33 DISALLOW_COPY_AND_ASSIGN(ScopedPop); | 33 DISALLOW_COPY_AND_ASSIGN(ScopedPop); |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 // CancelledTouchEvent mirrors a TouchEvent object. | 36 // CancelledTouchEvent mirrors a TouchEvent object. |
| 37 class MirroredTouchEvent : public TouchEvent { | 37 class MirroredTouchEvent : public TouchEvent { |
| 38 public: | 38 public: |
| 39 explicit MirroredTouchEvent(const TouchEvent* real) | 39 explicit MirroredTouchEvent(const TouchEvent* real) |
| 40 : TouchEvent(real->type(), | 40 : TouchEvent(real->type(), |
| 41 real->location(), | 41 real->location(), |
| 42 real->touch_id(), | 42 real->touch_id(), |
| 43 real->time_stamp()) { | 43 real->time_stamp()) { |
| 44 set_flags(real->flags()); | 44 set_flags(real->flags()); |
| 45 set_radius(real->radius_x(), real->radius_y()); | 45 set_radius(real->radius_x(), real->radius_y()); |
| 46 set_rotation_angle(real->rotation_angle()); | 46 set_rotation_angle(real->rotation_angle()); |
| 47 set_force(real->force()); | 47 set_force(real->force()); |
| 48 } | 48 } |
| 49 | 49 |
| 50 virtual ~MirroredTouchEvent() { | 50 virtual ~MirroredTouchEvent() { |
| 51 } | 51 } |
| 52 | 52 |
| 53 private: | 53 private: |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 RemoveConsumerFromMap(consumer, &touch_id_target_); | 291 RemoveConsumerFromMap(consumer, &touch_id_target_); |
| 292 RemoveConsumerFromMap(consumer, &touch_id_target_for_gestures_); | 292 RemoveConsumerFromMap(consumer, &touch_id_target_for_gestures_); |
| 293 } | 293 } |
| 294 | 294 |
| 295 // GestureRecognizer, static | 295 // GestureRecognizer, static |
| 296 GestureRecognizer* GestureRecognizer::Create(GestureEventHelper* helper) { | 296 GestureRecognizer* GestureRecognizer::Create(GestureEventHelper* helper) { |
| 297 return new GestureRecognizerImpl(helper); | 297 return new GestureRecognizerImpl(helper); |
| 298 } | 298 } |
| 299 | 299 |
| 300 } // namespace ui | 300 } // namespace ui |
| OLD | NEW |