diff options
| author | Grace Kloba <klobag@google.com> | 2009-12-09 16:00:52 -0800 |
|---|---|---|
| committer | Jean-Baptiste Queru <jbq@google.com> | 2009-12-10 09:47:27 -0800 |
| commit | dc417b235a5d3dc193fa6a4e1884fd04428b79e2 (patch) | |
| tree | b09892444cee007d162e5696b983ce33fb000d0b /WebKit/android/plugins | |
| parent | 02967298aed46eb168ef8ce30d7212e2ab0487c9 (diff) | |
| download | external_webkit-dc417b235a5d3dc193fa6a4e1884fd04428b79e2.zip external_webkit-dc417b235a5d3dc193fa6a4e1884fd04428b79e2.tar.gz external_webkit-dc417b235a5d3dc193fa6a4e1884fd04428b79e2.tar.bz2 | |
am 3d0d3fda: Enable longpress and doubletap to WebKit as touch event if it is requested.
Merge commit '3d0d3fdaa1308448b47592c03cda81c7f9e1f789' into eclair-mr2-plus-aosp
* commit '3d0d3fdaa1308448b47592c03cda81c7f9e1f789':
Enable longpress and doubletap to WebKit as touch
Diffstat (limited to 'WebKit/android/plugins')
| -rw-r--r-- | WebKit/android/plugins/android_npapi.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/WebKit/android/plugins/android_npapi.h b/WebKit/android/plugins/android_npapi.h index 40a31fa..ca62819 100644 --- a/WebKit/android/plugins/android_npapi.h +++ b/WebKit/android/plugins/android_npapi.h @@ -786,13 +786,29 @@ enum ANPTouchActions { the plugin chooses to not handle this action then no other events related to that particular touch gesture will be generated. */ - kDown_ANPTouchAction = 0, - kUp_ANPTouchAction = 1, - kMove_ANPTouchAction = 2, - kCancel_ANPTouchAction = 3, + kDown_ANPTouchAction = 0, + kUp_ANPTouchAction = 1, + kMove_ANPTouchAction = 2, + kCancel_ANPTouchAction = 3, + // The web view will ignore the return value from the following actions + kLongPress_ANPTouchAction = 4, + kDoubleTap_ANPTouchAction = 5, }; typedef int32_t ANPTouchAction; +/** + * When a plugin returns from NPP_HandleEvent() for a touch event, it can use + * ANPTouchResultMask to tell the web view which touch event it wants to handle. + * kHandleTouch_ANPTouchResult will handle all touch event inside the plugin. If + * it is not set, a plugin can choose only handle individual event like long + * press, or double tap. + */ +enum ANPTouchResultMask { + kHandleTouch_ANPTouchResult = 1, + kHandleLongPress_ANPTouchResult = 2, + kHandleDoubleTap_ANPTouchResult = 4, +}; + enum ANPLifecycleActions { /** The web view containing this plugin has been paused. See documentation on the android activity lifecycle for more information. |
