| 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 /* From ppp_instance.idl modified Thu Jun 28 15:08:39 2012. */ | 6 /* From ppp_instance.idl modified Thu Apr 25 13:07:47 2013. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_PPP_INSTANCE_H_ | 8 #ifndef PPAPI_C_PPP_INSTANCE_H_ |
| 9 #define PPAPI_C_PPP_INSTANCE_H_ | 9 #define PPAPI_C_PPP_INSTANCE_H_ |
| 10 | 10 |
| 11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
| 12 #include "ppapi/c/pp_instance.h" | 12 #include "ppapi/c/pp_instance.h" |
| 13 #include "ppapi/c/pp_macros.h" | 13 #include "ppapi/c/pp_macros.h" |
| 14 #include "ppapi/c/pp_point.h" | 14 #include "ppapi/c/pp_point.h" |
| 15 #include "ppapi/c/pp_rect.h" | 15 #include "ppapi/c/pp_rect.h" |
| 16 #include "ppapi/c/pp_resource.h" | 16 #include "ppapi/c/pp_resource.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 * returning true from your event handler. | 139 * returning true from your event handler. |
| 140 * | 140 * |
| 141 * @param[in] instance A <code>PP_Instance</code> identifying the instance | 141 * @param[in] instance A <code>PP_Instance</code> identifying the instance |
| 142 * receiving the input event. | 142 * receiving the input event. |
| 143 * | 143 * |
| 144 * @param[in] has_focus Indicates the new focused state of the instance. | 144 * @param[in] has_focus Indicates the new focused state of the instance. |
| 145 */ | 145 */ |
| 146 void (*DidChangeFocus)(PP_Instance instance, PP_Bool has_focus); | 146 void (*DidChangeFocus)(PP_Instance instance, PP_Bool has_focus); |
| 147 /** | 147 /** |
| 148 * HandleDocumentLoad() is called after initialize for a full-frame | 148 * HandleDocumentLoad() is called after initialize for a full-frame |
| 149 * module that was instantiated based on the MIME type of a DOMWindow | 149 * instance that was instantiated based on the MIME type of a DOMWindow |
| 150 * navigation. This situation only applies to modules that are pre-registered | 150 * navigation. This situation only applies to modules that are pre-registered |
| 151 * to handle certain MIME types. If you haven't specifically registered to | 151 * to handle certain MIME types. If you haven't specifically registered to |
| 152 * handle a MIME type or aren't positive this applies to you, your | 152 * handle a MIME type or aren't positive this applies to you, your |
| 153 * implementation of this function can just return <code>PP_FALSE</code>. | 153 * implementation of this function can just return <code>PP_FALSE</code>. |
| 154 * | 154 * |
| 155 * The given <code>url_loader</code> corresponds to a | 155 * The given <code>url_loader</code> corresponds to a |
| 156 * <code>PPB_URLLoader</code> instance that is already opened. Its response | 156 * <code>PPB_URLLoader</code> instance that is already opened. Its response |
| 157 * headers may be queried using <code>PPB_URLLoader::GetResponseInfo</code>. | 157 * headers may be queried using <code>PPB_URLLoader::GetResponseInfo</code>. |
| 158 * The reference count for the URL loader is not incremented automatically on | 158 * The reference count for the URL loader is not incremented automatically on |
| 159 * behalf of the module. You need to increment the reference count yourself | 159 * behalf of the module. You need to increment the reference count yourself |
| 160 * if you are going to keep a reference to it. | 160 * if you are going to keep a reference to it. |
| 161 * | 161 * |
| 162 * This method returns <code>PP_FALSE</code> if the module cannot handle the | 162 * This method returns <code>PP_FALSE</code> if the module cannot handle the |
| 163 * data. In response to this method, the module should call | 163 * data. In response to this method, the module should call |
| 164 * ReadResponseBody() to read the incoming data. | 164 * ReadResponseBody() to read the incoming data. |
| 165 * | 165 * |
| 166 * @param[in] instance A <code>PP_Instance</code> identifying the instance | 166 * @param[in] instance A <code>PP_Instance</code> identifying the instance |
| 167 * that should do the load. | 167 * that should do the load. |
| 168 * | 168 * |
| 169 * @param[in] url_loader An open <code>PPB_URLLoader</code> instance. | 169 * @param[in] url_loader An open <code>PPB_URLLoader</code> instance. |
| 170 * | 170 * |
| 171 * @return <code>PP_TRUE</code> if the data was handled, | 171 * @return <code>PP_TRUE</code> if the data was handled, |
| 172 * <code>PP_FALSE</code> otherwise. | 172 * <code>PP_FALSE</code> otherwise. If you return false, the load will be |
| 173 * canceled for you. |
| 173 */ | 174 */ |
| 174 PP_Bool (*HandleDocumentLoad)(PP_Instance instance, PP_Resource url_loader); | 175 PP_Bool (*HandleDocumentLoad)(PP_Instance instance, PP_Resource url_loader); |
| 175 }; | 176 }; |
| 176 | 177 |
| 177 typedef struct PPP_Instance_1_1 PPP_Instance; | 178 typedef struct PPP_Instance_1_1 PPP_Instance; |
| 178 | 179 |
| 179 struct PPP_Instance_1_0 { | 180 struct PPP_Instance_1_0 { |
| 180 PP_Bool (*DidCreate)(PP_Instance instance, | 181 PP_Bool (*DidCreate)(PP_Instance instance, |
| 181 uint32_t argc, | 182 uint32_t argc, |
| 182 const char* argn[], | 183 const char* argn[], |
| 183 const char* argv[]); | 184 const char* argv[]); |
| 184 void (*DidDestroy)(PP_Instance instance); | 185 void (*DidDestroy)(PP_Instance instance); |
| 185 void (*DidChangeView)(PP_Instance instance, | 186 void (*DidChangeView)(PP_Instance instance, |
| 186 const struct PP_Rect* position, | 187 const struct PP_Rect* position, |
| 187 const struct PP_Rect* clip); | 188 const struct PP_Rect* clip); |
| 188 void (*DidChangeFocus)(PP_Instance instance, PP_Bool has_focus); | 189 void (*DidChangeFocus)(PP_Instance instance, PP_Bool has_focus); |
| 189 PP_Bool (*HandleDocumentLoad)(PP_Instance instance, PP_Resource url_loader); | 190 PP_Bool (*HandleDocumentLoad)(PP_Instance instance, PP_Resource url_loader); |
| 190 }; | 191 }; |
| 191 /** | 192 /** |
| 192 * @} | 193 * @} |
| 193 */ | 194 */ |
| 194 | 195 |
| 195 #endif /* PPAPI_C_PPP_INSTANCE_H_ */ | 196 #endif /* PPAPI_C_PPP_INSTANCE_H_ */ |
| 196 | 197 |
| OLD | NEW |