| OLD | NEW |
| 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 */ | 4 */ |
| 5 | 5 |
| 6 /** | 6 /** |
| 7 * This file defines the <code>PPP_Instance</code> structure - a series of | 7 * This file defines the <code>PPP_Instance</code> structure - a series of |
| 8 * pointers to methods that you must implement in your module. | 8 * pointers to methods that you must implement in your module. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 /** | 170 /** |
| 171 * A handle to a <code>PPB_View</code> resource identifying the new view. | 171 * A handle to a <code>PPB_View</code> resource identifying the new view. |
| 172 */ | 172 */ |
| 173 [in] PP_Resource view); | 173 [in] PP_Resource view); |
| 174 | 174 |
| 175 /** | 175 /** |
| 176 * DidChangeFocus() is called when an instance has gained or lost focus. | 176 * DidChangeFocus() is called when an instance has gained or lost focus. |
| 177 * Having focus means that keyboard events will be sent to the instance. | 177 * Having focus means that keyboard events will be sent to the instance. |
| 178 * An instance's default condition is that it will not have focus. | 178 * An instance's default condition is that it will not have focus. |
| 179 * | 179 * |
| 180 * The focus flag takes into account both browser tab and window focus as |
| 181 * well as focus of the plugin element on the page. In order to be deemed |
| 182 * to have focus, the browser window must be topmost, the tab must be |
| 183 * selected in the window, and the instance must be the focused element on |
| 184 * the page. |
| 185 * |
| 180 * <strong>Note:</strong>Clicks on instances will give focus only if you | 186 * <strong>Note:</strong>Clicks on instances will give focus only if you |
| 181 * handle the click event. Return <code>true</code> from | 187 * handle the click event. Return <code>true</code> from |
| 182 * <code>HandleInputEvent</code> in <code>PPP_InputEvent</code> (or use | 188 * <code>HandleInputEvent</code> in <code>PPP_InputEvent</code> (or use |
| 183 * unfiltered events) to signal that the click event was handled. Otherwise, | 189 * unfiltered events) to signal that the click event was handled. Otherwise, |
| 184 * the browser will bubble the event and give focus to the element on the page | 190 * the browser will bubble the event and give focus to the element on the page |
| 185 * that actually did end up consuming it. If you're not getting focus, check | 191 * that actually did end up consuming it. If you're not getting focus, check |
| 186 * to make sure you're returning true from the mouse click in | 192 * to make sure you're either requesting them via |
| 187 * <code>HandleInputEvent</code>. | 193 * <code>RequestInputEvents()<code> (which implicitly marks all input events |
| 194 * as consumed) or via <code>RequestFilteringInputEvents()</code> and |
| 195 * returning true from your event handler. |
| 188 * | 196 * |
| 189 * @param[in] instance A <code>PP_Instance</code> identifying the instance | 197 * @param[in] instance A <code>PP_Instance</code> identifying the instance |
| 190 * receiving the input event. | 198 * receiving the input event. |
| 191 * | 199 * |
| 192 * @param[in] has_focus Indicates the new focused state of the instance. | 200 * @param[in] has_focus Indicates the new focused state of the instance. |
| 193 */ | 201 */ |
| 194 void DidChangeFocus( | 202 void DidChangeFocus( |
| 195 /* A PP_Instance identifying one instance of a module. */ | 203 /* A PP_Instance identifying one instance of a module. */ |
| 196 [in] PP_Instance instance, | 204 [in] PP_Instance instance, |
| 197 /* Indicates whether this NaCl module gained or lost event focus. */ | 205 /* Indicates whether this NaCl module gained or lost event focus. */ |
| (...skipping 26 matching lines...) Expand all Loading... |
| 224 * @return <code>PP_TRUE</code> if the data was handled, | 232 * @return <code>PP_TRUE</code> if the data was handled, |
| 225 * <code>PP_FALSE</code> otherwise. | 233 * <code>PP_FALSE</code> otherwise. |
| 226 */ | 234 */ |
| 227 PP_Bool HandleDocumentLoad( | 235 PP_Bool HandleDocumentLoad( |
| 228 /* A PP_Instance identifying one instance of a module. */ | 236 /* A PP_Instance identifying one instance of a module. */ |
| 229 [in] PP_Instance instance, | 237 [in] PP_Instance instance, |
| 230 /* A PP_Resource an open PPB_URLLoader instance. */ | 238 /* A PP_Resource an open PPB_URLLoader instance. */ |
| 231 [in] PP_Resource url_loader); | 239 [in] PP_Resource url_loader); |
| 232 | 240 |
| 233 }; | 241 }; |
| OLD | NEW |