|
OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 #ifndef UI_AURA_GESTURES_GESTURE_RECOGNIZER_GRAIL_H_ | |
5 #define UI_AURA_GESTURES_GESTURE_RECOGNIZER_GRAIL_H_ | |
6 #pragma once | |
7 | |
8 #include "ui/aura/gestures/gesture_recognizer.h" | |
9 | |
Elliot Glaysher
2012/03/28 17:49:00
Add "base/compiler_specific.h" for the OVERRIDE ma
| |
10 #include "base/memory/linked_ptr.h" | |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "ui/aura/aura_export.h" | |
13 #include "ui/base/events.h" | |
14 | |
15 #include <map> | |
sky
2012/03/28 20:30:36
Include order is wrong here. For a header you want
| |
16 #include <queue> | |
17 #include <vector> | |
18 | |
19 namespace aura { | |
20 class GestureEvent; | |
21 class TouchEvent; | |
22 class Window; | |
23 | |
24 // A GestureRecognizer is an abstract base class for | |
25 // conversion of touch events into gestures. | |
26 class AURA_EXPORT GestureRecognizerGrail : public GestureRecognizer { | |
sky
2012/03/28 20:30:36
Why do we need both a GestureRecognizer and Gestur
| |
27 public: | |
28 explicit GestureRecognizerGrail(RootWindow* window = NULL); | |
29 | |
30 // Invoked for each touch event that could contribute to | |
31 // the current gesture. | |
32 // Returns list of zero or more GestureEvents identified after processing | |
33 // TouchEvent. | |
34 // Caller would be responsible for freeing up Gestures. | |
35 virtual GestureRecognizer::Gestures* | |
36 ProcessTouchEventForGesture(const TouchEvent& event, | |
37 ui::TouchStatus status); | |
Elliot Glaysher
2012/03/28 17:49:00
OVERRIDE on all virtual methods that you're overri
| |
38 | |
39 void QueueTouchEventForGesture(Window* window, | |
40 const TouchEvent& event) { | |
41 // Implemented empty | |
42 } | |
43 | |
44 void FlushTouchQueue(Window* window) { | |
45 // Implemented empty | |
46 } | |
47 | |
48 virtual Gestures* AdvanceTouchQueue(Window* window, | |
Elliot Glaysher
2012/03/28 17:49:00
virtual methods with nonempty bodies go in impl. w
| |
49 bool processed) { | |
50 return NULL; | |
51 } | |
52 | |
53 private: | |
54 struct Private; | |
55 scoped_ptr<Private> d_; | |
56 | |
57 DISALLOW_COPY_AND_ASSIGN(GestureRecognizerGrail); | |
58 }; | |
59 } // namespace aura | |
60 | |
61 #endif // UI_AURA_GESTURES_GESTURE_RECOGNIZER_GRAIL_H_ | |
OLD | NEW |