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

Unified Diff: ui/events/gestures/gesture_provider_aura.h

Issue 251543003: Unified Gesture Recognizer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address jdduke comments. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: ui/events/gestures/gesture_provider_aura.h
diff --git a/ui/events/gestures/gesture_provider_aura.h b/ui/events/gestures/gesture_provider_aura.h
new file mode 100644
index 0000000000000000000000000000000000000000..f5fbcc70034553d6ac1b9eafa529fa4ac422db0c
--- /dev/null
+++ b/ui/events/gestures/gesture_provider_aura.h
@@ -0,0 +1,50 @@
+// Copyright 2014 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_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_
+#define UI_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_
+
+#include "base/basictypes.h"
+#include "ui/events/event.h"
+#include "ui/events/events_export.h"
+#include "ui/events/gesture_detection/filtered_gesture_provider.h"
+#include "ui/events/gesture_detection/gesture_event_data_packet.h"
+#include "ui/events/gesture_detection/touch_disposition_gesture_filter.h"
+#include "ui/events/gestures/motion_event_aura.h"
+
+namespace ui {
+
+class EVENTS_EXPORT GestureProviderAuraClient {
+ public:
+ virtual ~GestureProviderAuraClient() {}
+ virtual void OnGestureEvent(scoped_ptr<GestureEvent> event) = 0;
+};
+
+// Provides gesture detection and dispatch given a sequence of touch events
+// and touch event acks.
+class EVENTS_EXPORT GestureProviderAura : public GestureProviderClient {
+ public:
+ GestureProviderAura(GestureProviderAuraClient* client);
+ virtual ~GestureProviderAura();
+
+ bool OnTouchEvent(const TouchEvent& event);
+ void OnTouchEventAck(bool event_consumed);
+ const MotionEventAura& get_pointer_state() { return motion_event_; }
jdduke (slow) 2014/05/05 16:57:09 Nitty nit: Normally the getter name should match t
tdresser 2014/05/05 17:45:14 Done.
+
+ // GestureProviderClient implementation
+ virtual void OnGestureEvent(const GestureEventData& gesture) OVERRIDE;
+
+ private:
+ GestureProviderAuraClient* client_;
+ MotionEventAura motion_event_;
+ FilteredGestureProvider filtered_gesture_provider_;
+
+ int flags_;
jdduke (slow) 2014/05/05 16:57:09 Maybe last_touch_event_flags_ or something like th
tdresser 2014/05/05 17:45:14 Done.
+
+ DISALLOW_COPY_AND_ASSIGN(GestureProviderAura);
+};
+
+} // namespace ui
+
+#endif // UI_EVENTS_GESTURE_DETECTION_UI_GESTURE_PROVIDER_H_

Powered by Google App Engine
This is Rietveld 408576698