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

Unified Diff: ui/aura/root_window.h

Issue 101933004: Eager Gesture Recognizer (WIP) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Starting work on Android. Created 6 years, 11 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
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/aura/root_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window.h
diff --git a/ui/aura/root_window.h b/ui/aura/root_window.h
index 32893ec838d06211871bf36db77231425964f54d..10e11dadc7ca4aea6a425d7a7b4f788993310d4b 100644
--- a/ui/aura/root_window.h
+++ b/ui/aura/root_window.h
@@ -23,6 +23,7 @@
#include "ui/events/event_constants.h"
#include "ui/events/event_processor.h"
#include "ui/events/event_targeter.h"
+#include "ui/events/gestures/gesture_event_queue.h"
#include "ui/events/gestures/gesture_recognizer.h"
#include "ui/events/gestures/gesture_types.h"
#include "ui/gfx/native_widget_types.h"
@@ -56,7 +57,8 @@ class AURA_EXPORT RootWindow : public ui::EventProcessor,
public ui::GestureEventHelper,
public ui::LayerAnimationObserver,
public aura::client::CaptureDelegate,
- public aura::RootWindowHostDelegate {
+ public aura::RootWindowHostDelegate,
+ public ui::GestureEventQueueDelegate {
public:
struct AURA_EXPORT CreateParams {
// CreateParams with initial_bounds and default host in pixel.
@@ -133,7 +135,7 @@ class AURA_EXPORT RootWindow : public ui::EventProcessor,
// Handles a gesture event. Returns true if handled. Unlike the other
// event-dispatching function (e.g. for touch/mouse/keyboard events), gesture
// events are dispatched from GestureRecognizer instead of RootWindowHost.
- void DispatchGestureEvent(ui::GestureEvent* event);
+ virtual void DispatchGestureEvent(ui::GestureEvent* event) OVERRIDE;
// Invoked when |window| is being destroyed.
void OnWindowDestroying(Window* window);
@@ -195,6 +197,10 @@ class AURA_EXPORT RootWindow : public ui::EventProcessor,
// coordinates. This may return a point outside the root window's bounds.
gfx::Point GetLastMouseLocationInRoot() const;
+ void OnTouchEventForGestures(
+ ui::TouchEvent* event,
+ ui::TouchPointState::RequiresAck requires_ack);
+
private:
FRIEND_TEST_ALL_PREFIXES(RootWindowTest, KeepTranslatedEventInRoot);
@@ -261,7 +267,6 @@ class AURA_EXPORT RootWindow : public ui::EventProcessor,
// Overridden from ui::GestureEventHelper.
virtual bool CanDispatchToConsumer(ui::GestureConsumer* consumer) OVERRIDE;
- virtual void DispatchPostponedGestureEvent(ui::GestureEvent* event) OVERRIDE;
virtual void DispatchCancelTouchEvent(ui::TouchEvent* event) OVERRIDE;
// Overridden from ui::LayerAnimationObserver:
@@ -304,7 +309,8 @@ class AURA_EXPORT RootWindow : public ui::EventProcessor,
ui::EventDispatchDetails DispatchMouseEventToTarget(ui::MouseEvent* event,
Window* target)
WARN_UNUSED_RESULT;
- ui::EventDispatchDetails DispatchTouchEventImpl(ui::TouchEvent* event)
+ ui::EventDispatchDetails DispatchTouchEventImpl(ui::TouchEvent* event,
+ Window* target)
WARN_UNUSED_RESULT;
ui::EventDispatchDetails DispatchHeldEvents() WARN_UNUSED_RESULT;
// Creates and dispatches synthesized mouse move event using the
@@ -319,6 +325,8 @@ class AURA_EXPORT RootWindow : public ui::EventProcessor,
void PreDispatchLocatedEvent(Window* target, ui::LocatedEvent* event);
+ Window* GetTouchEventTarget(ui::TouchEvent* event);
+
// TODO(beng): evaluate the ideal ownership model.
scoped_ptr<Window> window_;
@@ -358,6 +366,8 @@ class AURA_EXPORT RootWindow : public ui::EventProcessor,
// Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0.
base::WeakPtrFactory<RootWindow> held_event_factory_;
+ std::map<Window*, ui::GestureEventQueue*> gesture_event_queues_;
+
DISALLOW_COPY_AND_ASSIGN(RootWindow);
};
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/aura/root_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698