From 38d035e33fc2fac4f5c23819c6974afe2caff47b Mon Sep 17 00:00:00 2001 From: "dmichael@chromium.org" Date: Wed, 20 Jul 2011 18:53:59 +0000 Subject: Revert 93223 - Reland http://codereview.chromium.org/7452002/ Update chromoting input events. (Clang caught this. Thanks, Clang!) Note I'm leaving in temporary backwards-compatibility. brettw, just need a rubber-stamp. This is the same as the last CL. awong/garykac/sergeyu, looking for someone on chromoting team to glance at my changes and make sure I didn't do anything you don't like. This is a high priority for 14, so please look if you can. BUG=None TEST=ppapi tests Review URL: http://codereview.chromium.org/7466002 TBR=dmichael@chromium.org Review URL: http://codereview.chromium.org/7471006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93229 0039d316-1c4b-4281-b951-d872f2087c98 --- ppapi/api/ppp_instance.idl | 45 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 8 deletions(-) (limited to 'ppapi/api') diff --git a/ppapi/api/ppp_instance.idl b/ppapi/api/ppp_instance.idl index aeb95b1..da8f7a9 100644 --- a/ppapi/api/ppp_instance.idl +++ b/ppapi/api/ppp_instance.idl @@ -9,7 +9,7 @@ */ label Chrome { - M14 = 1.0 + M14 = 0.5 }; /** @@ -161,13 +161,11 @@ interface PPP_Instance { * An instance's default condition is that it will not have focus. * * Note:Clicks on instances will give focus only if you - * handle the click event. Return true from - * HandleInputEvent in PPP_InputEvent (or use - * unfiltered events) to signal that the click event was handled. Otherwise, - * the browser will bubble the event and give focus to the element on the page - * that actually did end up consuming it. If you're not getting focus, check - * to make sure you're returning true from the mouse click in - * HandleInputEvent. + * handle the click event. Return true from HandleInputEvent to + * signal that the click event was handled. Otherwise the browser will bubble + * the event and give focus to the element on the page that actually did end + * up consuming it. If you're not getting focus, check to make sure you're + * returning true from the mouse click in HandleInputEvent. * * @param[in] instance A PP_Instance indentifying the instance * receiving the input event. @@ -181,6 +179,37 @@ interface PPP_Instance { [in] PP_Bool has_focus); /** + * HandleInputEvent() handles input events, such as keyboard events. This + * function returns PP_TRUE if the event was handled or + * PP_FALSE if it was not. + * + * If the event was handled, it will not be forwarded to the web page or + * browser. If it was not handled, it will bubble according to the normal + * rules. So it is important that a module respond accurately with whether + * event propagation should continue. + * + * Event propagation also controls focus. If you handle an event like a mouse + * event, typically the instance will be given focus. Returning false means + * that the click will be given to a lower part of the page and your module + * will not receive focus. This allows an instance to be partially + * transparent, where clicks on the transparent areas will behave like clicks + * to the underlying page. + * + * @param[in] instance A PP_Instance indentifying one instance + * of a module. + * + * @param[in] event The input event. + * + * @return PP_TRUE if event was handled, + * PP_FALSE otherwise. + */ + PP_Bool HandleInputEvent( + /* A PP_Instance indentifying one instance of a module. */ + [in] PP_Instance instance, + /* The event. */ + [in] PP_InputEvent event); + + /** * HandleDocumentLoad() is called after initialize for a full-frame * module that was instantiated based on the MIME type of a DOMWindow * navigation. This situation only applies to modules that are pre-registered -- cgit v1.1