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

Unified Diff: ui/aura/gestures/gesture_recognizer_grail.h

Issue 9773024: This patch implements Chromium's Aura gesture recognizer in terms of utouch-grail and utouch-frame … (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698