diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-30 00:37:31 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-30 00:37:31 +0000 |
commit | a01da568ae4cedff6da99518c13351f6ba1385a7 (patch) | |
tree | e64ffb378428cb5fd89f9d800d49bec04e56f9e7 /ppapi/cpp/instance.h | |
parent | efc2004cacc3e7e7afb1ceae8b02d2dff1005ddb (diff) | |
download | chromium_src-a01da568ae4cedff6da99518c13351f6ba1385a7.zip chromium_src-a01da568ae4cedff6da99518c13351f6ba1385a7.tar.gz chromium_src-a01da568ae4cedff6da99518c13351f6ba1385a7.tar.bz2 |
Plumb through the page focus lost event to Pepper plugins.
Previously this was only getting sent when the page had focus, which is pretty
useless. This patch also clarifies some API documentation.
BUG=135078
TEST=
Review URL: https://chromiumcodereview.appspot.com/10694026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145042 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/cpp/instance.h')
-rw-r--r-- | ppapi/cpp/instance.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/ppapi/cpp/instance.h b/ppapi/cpp/instance.h index 8d212d4..838d97b 100644 --- a/ppapi/cpp/instance.h +++ b/ppapi/cpp/instance.h @@ -141,12 +141,22 @@ class Instance { /// Having focus means that keyboard events will be sent to the instance. /// An instance's default condition is that it will not have focus. /// + /// The focus flag takes into account both browser tab and window focus as + /// well as focus of the plugin element on the page. In order to be deemed + /// to have focus, the browser window must be topmost, the tab must be + /// selected in the window, and the instance must be the focused element on + /// the page. + /// /// <strong>Note:</strong>Clicks on instances will give focus only if you - /// handle the click event. Return <code>true</code> 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 <code>HandleInputEvent</code>. + /// handle the click event. Return <code>true</code> from + /// <code>HandleInputEvent</code> in <code>PPP_InputEvent</code> (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 either requesting them via + /// <code>RequestInputEvents()<code> (which implicitly marks all input events + /// as consumed) or via <code>RequestFilteringInputEvents()</code> and + /// returning true from your event handler. /// /// @param[in] has_focus Indicates the new focused state of the instance. virtual void DidChangeFocus(bool has_focus); |