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

Side by Side Diff: ppapi/c/ppp_instance.h

Issue 11416064: Convert URLLoader to the new proxy design (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments, merge Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/api/ppp_instance.idl ('k') | ppapi/c/private/ppb_proxy_private.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 Mon Dec 10 21:15:00 2012. */
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
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 (Native Client
153 * implementation of this function can just return <code>PP_FALSE</code>. 153 * plugins can't register for MIME type handling), your implementation of
154 * this function can just return <code>PP_FALSE</code>.
154 * 155 *
155 * The given <code>url_loader</code> corresponds to a 156 * The given <code>url_loader</code> corresponds to a
156 * <code>PPB_URLLoader</code> instance that is already opened. Its response 157 * <code>PPB_URLLoader</code> instance that is already opened. Its response
157 * headers may be queried using <code>PPB_URLLoader::GetResponseInfo</code>. 158 * headers may be queried using <code>PPB_URLLoader::GetResponseInfo</code>.
158 * The reference count for the URL loader is not incremented automatically on 159 * 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 160 * behalf of the module. You need to increment the reference count yourself
160 * if you are going to keep a reference to it. 161 * if you are going to keep a reference to it.
161 * 162 *
162 * This method returns <code>PP_FALSE</code> if the module cannot handle the 163 * This method returns <code>PP_FALSE</code> if the module cannot handle the
163 * data. In response to this method, the module should call 164 * data. In response to this method, the module should call
164 * ReadResponseBody() to read the incoming data. 165 * ReadResponseBody() to read the incoming data.
165 * 166 *
166 * @param[in] instance A <code>PP_Instance</code> identifying the instance
167 * that should do the load.
168 *
169 * @param[in] url_loader An open <code>PPB_URLLoader</code> instance.
170 *
171 * @return <code>PP_TRUE</code> if the data was handled, 167 * @return <code>PP_TRUE</code> if the data was handled,
172 * <code>PP_FALSE</code> otherwise. 168 * <code>PP_FALSE</code> otherwise. If you return false, the load will be
169 * canceled for you.
173 */ 170 */
174 PP_Bool (*HandleDocumentLoad)(PP_Instance instance, PP_Resource url_loader); 171 PP_Bool (*HandleDocumentLoad)(PP_Instance instance, PP_Resource url_loader);
175 }; 172 };
176 173
177 typedef struct PPP_Instance_1_1 PPP_Instance; 174 typedef struct PPP_Instance_1_1 PPP_Instance;
178 175
179 struct PPP_Instance_1_0 { 176 struct PPP_Instance_1_0 {
180 PP_Bool (*DidCreate)(PP_Instance instance, 177 PP_Bool (*DidCreate)(PP_Instance instance,
181 uint32_t argc, 178 uint32_t argc,
182 const char* argn[], 179 const char* argn[],
183 const char* argv[]); 180 const char* argv[]);
184 void (*DidDestroy)(PP_Instance instance); 181 void (*DidDestroy)(PP_Instance instance);
185 void (*DidChangeView)(PP_Instance instance, 182 void (*DidChangeView)(PP_Instance instance,
186 const struct PP_Rect* position, 183 const struct PP_Rect* position,
187 const struct PP_Rect* clip); 184 const struct PP_Rect* clip);
188 void (*DidChangeFocus)(PP_Instance instance, PP_Bool has_focus); 185 void (*DidChangeFocus)(PP_Instance instance, PP_Bool has_focus);
189 PP_Bool (*HandleDocumentLoad)(PP_Instance instance, PP_Resource url_loader); 186 PP_Bool (*HandleDocumentLoad)(PP_Instance instance, PP_Resource url_loader);
190 }; 187 };
191 /** 188 /**
192 * @} 189 * @}
193 */ 190 */
194 191
195 #endif /* PPAPI_C_PPP_INSTANCE_H_ */ 192 #endif /* PPAPI_C_PPP_INSTANCE_H_ */
196 193
OLDNEW
« no previous file with comments | « ppapi/api/ppp_instance.idl ('k') | ppapi/c/private/ppb_proxy_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698