Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(776)

Unified Diff: ppapi/cpp/instance.h

Issue 10694026: Plumb through the page focus lost event to Pepper plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/c/ppp_instance.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/instance.h
diff --git a/ppapi/cpp/instance.h b/ppapi/cpp/instance.h
index 8d212d43a56b25ebad4ab7f73f23f3da4bfc0541..838d97baac5f561f6be7f30ed942925e801f2587 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);
« no previous file with comments | « ppapi/c/ppp_instance.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698