diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-28 23:47:27 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-28 23:47:27 +0000 |
commit | 3dc1f218b4f89c54238866df420fe8cfd810893c (patch) | |
tree | fa0a13f575e5842a6611a10a7311405a1d480315 /ppapi | |
parent | dc0241134ae9d098af457eed4e9f2e9e3051ea71 (diff) | |
download | chromium_src-3dc1f218b4f89c54238866df420fe8cfd810893c.zip chromium_src-3dc1f218b4f89c54238866df420fe8cfd810893c.tar.gz chromium_src-3dc1f218b4f89c54238866df420fe8cfd810893c.tar.bz2 |
ppapi: Opt-in to receive synthetic mouse events for touch-events.
If a pepper plugin did not opt-in to receive touch-events, then opt-in to receive
synthetic mouse-events instead.
BUG=138362
Review URL: https://codereview.chromium.org/11418134
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170097 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r-- | ppapi/api/ppb_input_event.idl | 10 | ||||
-rw-r--r-- | ppapi/c/ppb_input_event.h | 12 |
2 files changed, 19 insertions, 3 deletions
diff --git a/ppapi/api/ppb_input_event.idl b/ppapi/api/ppb_input_event.idl index 73e279d..496a0a6 100644 --- a/ppapi/api/ppb_input_event.idl +++ b/ppapi/api/ppb_input_event.idl @@ -265,7 +265,12 @@ enum PP_InputEvent_Class { * * Request touch events only if you intend to handle them. If the browser * knows you do not need to handle touch events, it can handle them at a - * higher level and achieve higher performance. + * higher level and achieve higher performance. If the plugin does not + * register for touch-events, then it will receive synthetic mouse events that + * are generated from the touch events (e.g. mouse-down for touch-start, + * mouse-move for touch-move (with left-button down), and mouse-up for + * touch-end. If the plugin does register for touch events, then the synthetic + * mouse events are not created. */ PP_INPUTEVENT_CLASS_TOUCH = 1 << 3, @@ -306,6 +311,9 @@ interface PPB_InputEvent { * processed very quickly, may have a noticeable effect on the performance of * the page. * + * Note that synthetic mouse events will be generated from touch events if + * (and only if) the you do not request touch events. + * * When requesting input events through this function, the events will be * delivered and <i>not</i> bubbled to the page. This means that even if you * aren't interested in the message, no other parts of the page will get diff --git a/ppapi/c/ppb_input_event.h b/ppapi/c/ppb_input_event.h index 6122b58..bc6ebcb 100644 --- a/ppapi/c/ppb_input_event.h +++ b/ppapi/c/ppb_input_event.h @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* From ppb_input_event.idl modified Tue Aug 14 09:41:28 2012. */ +/* From ppb_input_event.idl modified Mon Nov 26 19:51:21 2012. */ #ifndef PPAPI_C_PPB_INPUT_EVENT_H_ #define PPAPI_C_PPB_INPUT_EVENT_H_ @@ -274,7 +274,12 @@ typedef enum { * * Request touch events only if you intend to handle them. If the browser * knows you do not need to handle touch events, it can handle them at a - * higher level and achieve higher performance. + * higher level and achieve higher performance. If the plugin does not + * register for touch-events, then it will receive synthetic mouse events that + * are generated from the touch events (e.g. mouse-down for touch-start, + * mouse-move for touch-move (with left-button down), and mouse-up for + * touch-end. If the plugin does register for touch events, then the synthetic + * mouse events are not created. */ PP_INPUTEVENT_CLASS_TOUCH = 1 << 3, /** @@ -321,6 +326,9 @@ struct PPB_InputEvent_1_0 { * processed very quickly, may have a noticeable effect on the performance of * the page. * + * Note that synthetic mouse events will be generated from touch events if + * (and only if) the you do not request touch events. + * * When requesting input events through this function, the events will be * delivered and <i>not</i> bubbled to the page. This means that even if you * aren't interested in the message, no other parts of the page will get |