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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 * @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. |
201 */ | 201 */ |
202 void DidChangeFocus( | 202 void DidChangeFocus( |
203 /* A PP_Instance identifying one instance of a module. */ | 203 /* A PP_Instance identifying one instance of a module. */ |
204 [in] PP_Instance instance, | 204 [in] PP_Instance instance, |
205 /* Indicates whether this NaCl module gained or lost event focus. */ | 205 /* Indicates whether this NaCl module gained or lost event focus. */ |
206 [in] PP_Bool has_focus); | 206 [in] PP_Bool has_focus); |
207 | 207 |
208 /** | 208 /** |
209 * HandleDocumentLoad() is called after initialize for a full-frame | 209 * HandleDocumentLoad() is called after initialize for a full-frame |
210 * module that was instantiated based on the MIME type of a DOMWindow | 210 * instance that was instantiated based on the MIME type of a DOMWindow |
211 * navigation. This situation only applies to modules that are pre-registered | 211 * navigation. This situation only applies to modules that are pre-registered |
212 * to handle certain MIME types. If you haven't specifically registered to | 212 * to handle certain MIME types. If you haven't specifically registered to |
213 * handle a MIME type or aren't positive this applies to you, your | 213 * handle a MIME type or aren't positive this applies to you (Native Client |
214 * implementation of this function can just return <code>PP_FALSE</code>. | 214 * plugins can't register for MIME type handling), your implementation of |
| 215 * this function can just return <code>PP_FALSE</code>. |
215 * | 216 * |
216 * The given <code>url_loader</code> corresponds to a | 217 * The given <code>url_loader</code> corresponds to a |
217 * <code>PPB_URLLoader</code> instance that is already opened. Its response | 218 * <code>PPB_URLLoader</code> instance that is already opened. Its response |
218 * headers may be queried using <code>PPB_URLLoader::GetResponseInfo</code>. | 219 * headers may be queried using <code>PPB_URLLoader::GetResponseInfo</code>. |
219 * The reference count for the URL loader is not incremented automatically on | 220 * The reference count for the URL loader is not incremented automatically on |
220 * behalf of the module. You need to increment the reference count yourself | 221 * behalf of the module. You need to increment the reference count yourself |
221 * if you are going to keep a reference to it. | 222 * if you are going to keep a reference to it. |
222 * | 223 * |
223 * This method returns <code>PP_FALSE</code> if the module cannot handle the | 224 * This method returns <code>PP_FALSE</code> if the module cannot handle the |
224 * data. In response to this method, the module should call | 225 * data. In response to this method, the module should call |
225 * ReadResponseBody() to read the incoming data. | 226 * ReadResponseBody() to read the incoming data. |
226 * | 227 * |
227 * @param[in] instance A <code>PP_Instance</code> identifying the instance | |
228 * that should do the load. | |
229 * | |
230 * @param[in] url_loader An open <code>PPB_URLLoader</code> instance. | |
231 * | |
232 * @return <code>PP_TRUE</code> if the data was handled, | 228 * @return <code>PP_TRUE</code> if the data was handled, |
233 * <code>PP_FALSE</code> otherwise. | 229 * <code>PP_FALSE</code> otherwise. If you return false, the load will be |
| 230 * canceled for you. |
234 */ | 231 */ |
235 PP_Bool HandleDocumentLoad( | 232 PP_Bool HandleDocumentLoad( |
236 /* A PP_Instance identifying one instance of a module. */ | 233 /* A PP_Instance identifying one instance of a module. */ |
237 [in] PP_Instance instance, | 234 [in] PP_Instance instance, |
238 /* A PP_Resource an open PPB_URLLoader instance. */ | 235 /* A PP_Resource an open PPB_URLLoader instance. */ |
239 [in] PP_Resource url_loader); | 236 [in] PP_Resource url_loader); |
240 | 237 |
241 }; | 238 }; |
OLD | NEW |