Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Side by Side Diff: ui/base/gestures/gesture_recognizer_impl.cc

Issue 10834283: gesture recognizer: Some cleanup and workaround for a crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/base/gestures/gesture_sequence.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/base/gestures/gesture_sequence.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698