Chromium Code Reviews| Index: ui/aura/gestures/gesture_recognizer_grail.h |
| =================================================================== |
| --- ui/aura/gestures/gesture_recognizer_grail.h (revision 0) |
| +++ ui/aura/gestures/gesture_recognizer_grail.h (revision 0) |
| @@ -0,0 +1,61 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| +#ifndef UI_AURA_GESTURES_GESTURE_RECOGNIZER_GRAIL_H_ |
| +#define UI_AURA_GESTURES_GESTURE_RECOGNIZER_GRAIL_H_ |
| +#pragma once |
| + |
| +#include "ui/aura/gestures/gesture_recognizer.h" |
| + |
|
Elliot Glaysher
2012/03/28 17:49:00
Add "base/compiler_specific.h" for the OVERRIDE ma
|
| +#include "base/memory/linked_ptr.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "ui/aura/aura_export.h" |
| +#include "ui/base/events.h" |
| + |
| +#include <map> |
|
sky
2012/03/28 20:30:36
Include order is wrong here. For a header you want
|
| +#include <queue> |
| +#include <vector> |
| + |
| +namespace aura { |
| +class GestureEvent; |
| +class TouchEvent; |
| +class Window; |
| + |
| +// A GestureRecognizer is an abstract base class for |
| +// conversion of touch events into gestures. |
| +class AURA_EXPORT GestureRecognizerGrail : public GestureRecognizer { |
|
sky
2012/03/28 20:30:36
Why do we need both a GestureRecognizer and Gestur
|
| + public: |
| + explicit GestureRecognizerGrail(RootWindow* window = NULL); |
| + |
| + // Invoked for each touch event that could contribute to |
| + // the current gesture. |
| + // Returns list of zero or more GestureEvents identified after processing |
| + // TouchEvent. |
| + // Caller would be responsible for freeing up Gestures. |
| + virtual GestureRecognizer::Gestures* |
| + ProcessTouchEventForGesture(const TouchEvent& event, |
| + ui::TouchStatus status); |
|
Elliot Glaysher
2012/03/28 17:49:00
OVERRIDE on all virtual methods that you're overri
|
| + |
| + void QueueTouchEventForGesture(Window* window, |
| + const TouchEvent& event) { |
| + // Implemented empty |
| + } |
| + |
| + void FlushTouchQueue(Window* window) { |
| + // Implemented empty |
| + } |
| + |
| + virtual Gestures* AdvanceTouchQueue(Window* window, |
|
Elliot Glaysher
2012/03/28 17:49:00
virtual methods with nonempty bodies go in impl. w
|
| + bool processed) { |
| + return NULL; |
| + } |
| + |
| + private: |
| + struct Private; |
| + scoped_ptr<Private> d_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(GestureRecognizerGrail); |
| +}; |
| +} // namespace aura |
| + |
| +#endif // UI_AURA_GESTURES_GESTURE_RECOGNIZER_GRAIL_H_ |
| Property changes on: ui/aura/gestures/gesture_recognizer_grail.h |
| ___________________________________________________________________ |
| Added: svn:eol-style |
| + LF |