| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_MOTION_EVENT_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_MOTION_EVENT_ANDROID_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_MOTION_EVENT_ANDROID_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_MOTION_EVENT_ANDROID_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 virtual base::TimeTicks GetEventTime() const OVERRIDE; | 57 virtual base::TimeTicks GetEventTime() const OVERRIDE; |
| 58 virtual size_t GetHistorySize() const OVERRIDE; | 58 virtual size_t GetHistorySize() const OVERRIDE; |
| 59 virtual base::TimeTicks GetHistoricalEventTime( | 59 virtual base::TimeTicks GetHistoricalEventTime( |
| 60 size_t historical_index) const OVERRIDE; | 60 size_t historical_index) const OVERRIDE; |
| 61 virtual float GetHistoricalTouchMajor(size_t pointer_index, | 61 virtual float GetHistoricalTouchMajor(size_t pointer_index, |
| 62 size_t historical_index) const OVERRIDE; | 62 size_t historical_index) const OVERRIDE; |
| 63 virtual float GetHistoricalX(size_t pointer_index, | 63 virtual float GetHistoricalX(size_t pointer_index, |
| 64 size_t historical_index) const OVERRIDE; | 64 size_t historical_index) const OVERRIDE; |
| 65 virtual float GetHistoricalY(size_t pointer_index, | 65 virtual float GetHistoricalY(size_t pointer_index, |
| 66 size_t historical_index) const OVERRIDE; | 66 size_t historical_index) const OVERRIDE; |
| 67 virtual int GetSource() const OVERRIDE; |
| 68 virtual int GetButtonState() const OVERRIDE; |
| 67 virtual scoped_ptr<MotionEvent> Clone() const OVERRIDE; | 69 virtual scoped_ptr<MotionEvent> Clone() const OVERRIDE; |
| 68 virtual scoped_ptr<MotionEvent> Cancel() const OVERRIDE; | 70 virtual scoped_ptr<MotionEvent> Cancel() const OVERRIDE; |
| 69 | 71 |
| 70 // Additional Android MotionEvent methods. | 72 // Additional Android MotionEvent methods. |
| 71 float GetTouchMinor() const { return GetTouchMinor(0); } | 73 float GetTouchMinor() const { return GetTouchMinor(0); } |
| 72 float GetTouchMinor(size_t pointer_index) const; | 74 float GetTouchMinor(size_t pointer_index) const; |
| 73 float GetOrientation() const; | 75 float GetOrientation() const; |
| 74 base::TimeTicks GetDownTime() const; | 76 base::TimeTicks GetDownTime() const; |
| 75 | 77 |
| 76 static bool RegisterMotionEventAndroid(JNIEnv* env); | 78 static bool RegisterMotionEventAndroid(JNIEnv* env); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 const float pix_to_dip_; | 118 const float pix_to_dip_; |
| 117 | 119 |
| 118 // Whether |event_| should be recycled on destruction. This will only be true | 120 // Whether |event_| should be recycled on destruction. This will only be true |
| 119 // for those events generated via |Obtain(...)|. | 121 // for those events generated via |Obtain(...)|. |
| 120 bool should_recycle_; | 122 bool should_recycle_; |
| 121 }; | 123 }; |
| 122 | 124 |
| 123 } // namespace content | 125 } // namespace content |
| 124 | 126 |
| 125 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOTION_EVENT_ANDROID_H_ | 127 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOTION_EVENT_ANDROID_H_ |
| OLD | NEW |