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

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

Issue 789363004: WindowManagerApp should recognize gestures (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rename Aura to Impl and add FIXME Created 5 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/events/gestures/gesture_recognizer_impl.cc ('k') | ui/events/gestures/motion_event_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/gestures/motion_event_aura.h
diff --git a/ui/events/gestures/motion_event_aura.h b/ui/events/gestures/motion_event_aura.h
deleted file mode 100644
index 7ba2726fbe237379902485daa64c625714ac4c14..0000000000000000000000000000000000000000
--- a/ui/events/gestures/motion_event_aura.h
+++ /dev/null
@@ -1,102 +0,0 @@
-// 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_MOTION_EVENT_H_
-#define UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_H_
-
-#include <map>
-
-#include "base/memory/scoped_ptr.h"
-#include "base/time/time.h"
-#include "ui/events/event.h"
-#include "ui/events/events_export.h"
-#include "ui/events/gesture_detection/motion_event.h"
-
-namespace ui {
-
-// Implementation of MotionEvent which takes a stream of ui::TouchEvents.
-class EVENTS_EXPORT MotionEventAura : public MotionEvent {
- public:
- MotionEventAura();
- virtual ~MotionEventAura();
-
- void OnTouch(const TouchEvent& touch);
-
- // MotionEvent implementation.
- virtual int GetId() const override;
- virtual Action GetAction() const override;
- virtual int GetActionIndex() const override;
- virtual size_t GetPointerCount() const override;
- virtual int GetPointerId(size_t pointer_index) const override;
- virtual float GetX(size_t pointer_index) const override;
- virtual float GetY(size_t pointer_index) const override;
- virtual float GetRawX(size_t pointer_index) const override;
- virtual float GetRawY(size_t pointer_index) const override;
- virtual float GetTouchMajor(size_t pointer_index) const override;
- virtual float GetTouchMinor(size_t pointer_index) const override;
- virtual float GetOrientation(size_t pointer_index) const override;
- virtual float GetPressure(size_t pointer_index) const override;
- virtual ToolType GetToolType(size_t pointer_index) const override;
- virtual int GetButtonState() const override;
- virtual int GetFlags() const override;
- virtual base::TimeTicks GetEventTime() const override;
-
- virtual scoped_ptr<MotionEvent> Clone() const override;
- virtual scoped_ptr<MotionEvent> Cancel() const override;
-
- int GetSourceDeviceId(size_t pointer_index) const;
-
- // We can't cleanup removed touch points immediately upon receipt of a
- // TouchCancel or TouchRelease, as the MotionEvent needs to be able to report
- // information about those touch events. Once the MotionEvent has been
- // processed, we call CleanupRemovedTouchPoints to do the required
- // book-keeping.
- void CleanupRemovedTouchPoints(const TouchEvent& event);
-
- private:
- struct PointData {
- PointData();
- float x;
- float y;
- float raw_x;
- float raw_y;
- int touch_id;
- float pressure;
- int source_device_id;
- float touch_major;
- float touch_minor;
- float orientation;
- };
-
- MotionEventAura(
- size_t pointer_count,
- const base::TimeTicks& last_touch_time,
- Action cached_action,
- int cached_action_index,
- int flags,
- const PointData (&active_touches)[MotionEvent::MAX_TOUCH_POINT_COUNT]);
-
- static PointData GetPointDataFromTouchEvent(const TouchEvent& touch);
- void AddTouch(const TouchEvent& touch);
- void UpdateTouch(const TouchEvent& touch);
- void UpdateCachedAction(const TouchEvent& touch);
- size_t GetIndexFromId(int id) const;
-
- size_t pointer_count_;
- base::TimeTicks last_touch_time_;
- Action cached_action_;
- // The index of the touch responsible for last ACTION_POINTER_DOWN or
- // ACTION_POINTER_UP. -1 if no such action has occurred.
- int cached_action_index_;
- int flags_;
-
- // We want constant time indexing by pointer_index, and fast indexing by id.
- PointData active_touches_[MotionEvent::MAX_TOUCH_POINT_COUNT];
-
- DISALLOW_COPY_AND_ASSIGN(MotionEventAura);
-};
-
-} // namespace ui
-
-#endif // UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_H_
« no previous file with comments | « ui/events/gestures/gesture_recognizer_impl.cc ('k') | ui/events/gestures/motion_event_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698