| Index: content/browser/renderer_host/input/motion_event_android.h
|
| diff --git a/content/browser/renderer_host/input/motion_event_android.h b/content/browser/renderer_host/input/motion_event_android.h
|
| index 15cac96ff98938fc8864e5de7cd45b68e211ab0b..81550b27198fef20bbfde2656036ae3a9e9a8f82 100644
|
| --- a/content/browser/renderer_host/input/motion_event_android.h
|
| +++ b/content/browser/renderer_host/input/motion_event_android.h
|
| @@ -29,11 +29,13 @@ class MotionEventAndroid {
|
| ACTION_POINTER_UP = 6
|
| };
|
|
|
| - explicit MotionEventAndroid(jobject event);
|
| + MotionEventAndroid(JNIEnv* env, jobject event, bool should_recycle);
|
| + MotionEventAndroid(const MotionEventAndroid& other);
|
| + MotionEventAndroid& operator=(const MotionEventAndroid& other);
|
| ~MotionEventAndroid();
|
|
|
| Action GetActionMasked() const;
|
| - size_t GetActionIndex() const;
|
| + int GetActionIndex() const;
|
| size_t GetPointerCount() const;
|
| int GetPointerId(size_t pointer_index) const;
|
| float GetPressure() const { return GetPressure(0); }
|
| @@ -61,25 +63,32 @@ class MotionEventAndroid {
|
|
|
| static bool RegisterMotionEventAndroid(JNIEnv* env);
|
|
|
| - static scoped_ptr<MotionEventAndroid> Obtain(const MotionEventAndroid& event);
|
| - static scoped_ptr<MotionEventAndroid> Obtain(base::TimeTicks down_time,
|
| - base::TimeTicks event_time,
|
| - Action action,
|
| - float x,
|
| - float y);
|
| + static base::android::ScopedJavaLocalRef<jobject> Obtain(
|
| + const MotionEventAndroid& event);
|
| + static base::android::ScopedJavaLocalRef<jobject> Obtain(
|
| + base::TimeTicks down_time,
|
| + base::TimeTicks event_time,
|
| + Action action,
|
| + float x,
|
| + float y);
|
|
|
| private:
|
| - MotionEventAndroid(const base::android::ScopedJavaLocalRef<jobject>& event,
|
| - bool should_recycle);
|
| + MotionEventAndroid();
|
|
|
| // The Java reference to the underlying MotionEvent.
|
| base::android::ScopedJavaGlobalRef<jobject> event_;
|
|
|
| + base::TimeTicks cached_time_;
|
| + Action cached_action_;
|
| + size_t cached_pointer_count_;
|
| + size_t cached_history_size_;
|
| + int cached_action_index_;
|
| + float cached_x_;
|
| + float cached_y_;
|
| +
|
| // Whether |event_| should be recycled on destruction. This will only be true
|
| // for those events generated via |Obtain(...)|.
|
| bool should_recycle_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(MotionEventAndroid);
|
| };
|
|
|
| } // namespace content
|
|
|