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

Unified Diff: ui/events/gesture_detection/scale_gesture_detector.h

Issue 617423002: Make GestureTextSelector detect its own gestures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sort gyp/gn Created 6 years, 2 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/gesture_detection/scale_gesture_detector.h
diff --git a/ui/events/gesture_detection/scale_gesture_detector.h b/ui/events/gesture_detection/scale_gesture_detector.h
index 9b1c9a8927af527ef1f43ff1f01e952369e21c4f..d45ca4e3796aa087566b97dca32ecc19138afbdb 100644
--- a/ui/events/gesture_detection/scale_gesture_detector.h
+++ b/ui/events/gesture_detection/scale_gesture_detector.h
@@ -11,12 +11,13 @@
namespace ui {
class MotionEvent;
+class ScaleGestureListener;
// Port of ScaleGestureDetector.java from Android
// * platform/frameworks/base/core/java/android/view/ScaleGestureDetector.java
// * Change-Id: I3e7926a4f6f9ab4951f380bd004499c78b3bda69
// * Please update the Change-Id as upstream Android changes are pulled.
-class ScaleGestureDetector {
+class GESTURE_DETECTION_EXPORT ScaleGestureDetector {
public:
struct GESTURE_DETECTION_EXPORT Config {
Config();
@@ -38,34 +39,6 @@ class ScaleGestureDetector {
float min_pinch_update_span_delta;
};
- class ScaleGestureListener {
- public:
- virtual ~ScaleGestureListener() {}
- virtual bool OnScale(const ScaleGestureDetector& detector,
- const MotionEvent& e) = 0;
- virtual bool OnScaleBegin(const ScaleGestureDetector& detector,
- const MotionEvent& e) = 0;
- virtual void OnScaleEnd(const ScaleGestureDetector& detector,
- const MotionEvent& e) = 0;
- };
-
- // A convenience class to extend when you only want to listen for a subset of
- // scaling-related events. This implements all methods in
- // |ScaleGestureListener| but does nothing.
- // |OnScale()| returns false so that a subclass can retrieve the accumulated
- // scale factor in an overridden |OnScaleEnd()|.
- // |OnScaleBegin() returns true.
- class SimpleScaleGestureListener : public ScaleGestureListener {
- public:
- // ScaleGestureListener implementation.
- virtual bool OnScale(const ScaleGestureDetector&,
- const MotionEvent&) OVERRIDE;
- virtual bool OnScaleBegin(const ScaleGestureDetector&,
- const MotionEvent&) OVERRIDE;
- virtual void OnScaleEnd(const ScaleGestureDetector&,
- const MotionEvent&) OVERRIDE;
- };
-
ScaleGestureDetector(const Config& config, ScaleGestureListener* listener);
virtual ~ScaleGestureDetector();
« no previous file with comments | « ui/events/gesture_detection/gesture_provider.cc ('k') | ui/events/gesture_detection/scale_gesture_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698