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

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

Issue 10365009: Adding Gesture Recognition to RenderWidgetHostViewWin (web client) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed views dependency. Created 8 years, 7 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
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 #ifndef UI_BASE_GESTURES_GESTURE_RECOGNIZER_IMPL_H_ 5 #ifndef UI_BASE_GESTURES_GESTURE_RECOGNIZER_IMPL_H_
6 #define UI_BASE_GESTURES_GESTURE_RECOGNIZER_IMPL_H_ 6 #define UI_BASE_GESTURES_GESTURE_RECOGNIZER_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <queue> 10 #include <queue>
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 virtual GestureSequence* GetGestureSequenceForConsumer(GestureConsumer* c); 50 virtual GestureSequence* GetGestureSequenceForConsumer(GestureConsumer* c);
51 51
52 private: 52 private:
53 // Overridden from GestureRecognizer 53 // Overridden from GestureRecognizer
54 virtual Gestures* ProcessTouchEventForGesture( 54 virtual Gestures* ProcessTouchEventForGesture(
55 const TouchEvent& event, 55 const TouchEvent& event,
56 ui::TouchStatus status, 56 ui::TouchStatus status,
57 GestureConsumer* target) OVERRIDE; 57 GestureConsumer* target) OVERRIDE;
58 virtual void QueueTouchEventForGesture(GestureConsumer* consumer, 58 virtual void QueueTouchEventForGesture(GestureConsumer* consumer,
59 const TouchEvent& event) OVERRIDE; 59 const TouchEvent& event) OVERRIDE;
60 virtual bool IsQueueEmpty(GestureConsumer* consumer) OVERRIDE;
61
60 virtual Gestures* AdvanceTouchQueue(GestureConsumer* consumer, 62 virtual Gestures* AdvanceTouchQueue(GestureConsumer* consumer,
61 bool processed) OVERRIDE; 63 bool processed) OVERRIDE;
62 virtual void FlushTouchQueue(GestureConsumer* consumer) OVERRIDE; 64 virtual void FlushTouchQueue(GestureConsumer* consumer) OVERRIDE;
63 65
64 typedef std::queue<TouchEvent*> TouchEventQueue; 66 typedef std::queue<TouchEvent*> TouchEventQueue;
65 std::map<GestureConsumer*, TouchEventQueue*> event_queue_; 67 std::map<GestureConsumer*, TouchEventQueue*> event_queue_;
66 std::map<GestureConsumer*, GestureSequence*> consumer_sequence_; 68 std::map<GestureConsumer*, GestureSequence*> consumer_sequence_;
67 69
68 // Both touch_id_target_ and touch_id_target_for_gestures_ 70 // Both touch_id_target_ and touch_id_target_for_gestures_
69 // map a touch-id to its target window. 71 // map a touch-id to its target window.
70 // touch_ids are removed from touch_id_target_ on ET_TOUCH_RELEASE 72 // touch_ids are removed from touch_id_target_ on ET_TOUCH_RELEASE
71 // and ET_TOUCH_CANCEL. touch_id_target_for_gestures_ never has touch_ids 73 // and ET_TOUCH_CANCEL. touch_id_target_for_gestures_ never has touch_ids
72 // removed. 74 // removed.
73 std::map<int, GestureConsumer*> touch_id_target_; 75 std::map<int, GestureConsumer*> touch_id_target_;
74 std::map<int, GestureConsumer*> touch_id_target_for_gestures_; 76 std::map<int, GestureConsumer*> touch_id_target_for_gestures_;
75 77
76 // Touches cancelled by touch capture are routed to the 78 // Touches cancelled by touch capture are routed to the
77 // gesture_consumer_ignorer_. 79 // gesture_consumer_ignorer_.
78 scoped_ptr<GestureConsumer> gesture_consumer_ignorer_; 80 scoped_ptr<GestureConsumer> gesture_consumer_ignorer_;
79 GestureEventHelper* helper_; 81 GestureEventHelper* helper_;
80 82
81 DISALLOW_COPY_AND_ASSIGN(GestureRecognizerImpl); 83 DISALLOW_COPY_AND_ASSIGN(GestureRecognizerImpl);
82 }; 84 };
83 85
84 } // namespace ui 86 } // namespace ui
85 87
86 #endif // UI_BASE_GESTURES_GESTURE_RECOGNIZER_IMPL_H_ 88 #endif // UI_BASE_GESTURES_GESTURE_RECOGNIZER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698