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

Side by Side Diff: trunk/src/ppapi/c/private/ppb_nacl_private.h

Issue 406323003: Revert 284684 "Pepper: Delete FileDownloader in trusted plugin." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
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 private/ppb_nacl_private.idl modified Thu Jul 10 10:34:30 2014. */ 6 /* From private/ppb_nacl_private.idl modified Wed Jul 9 11:09:04 2014. */
7 7
8 #ifndef PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ 8 #ifndef PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_
9 #define PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ 9 #define PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_
10 10
11 #include "ppapi/c/pp_bool.h" 11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_completion_callback.h" 12 #include "ppapi/c/pp_completion_callback.h"
13 #include "ppapi/c/pp_instance.h" 13 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/c/pp_macros.h" 14 #include "ppapi/c/pp_macros.h"
15 #include "ppapi/c/pp_stdint.h" 15 #include "ppapi/c/pp_stdint.h"
16 #include "ppapi/c/pp_var.h" 16 #include "ppapi/c/pp_var.h"
17 #include "ppapi/c/private/ppp_pexe_stream_handler.h"
18 17
19 #define PPB_NACL_PRIVATE_INTERFACE_1_0 "PPB_NaCl_Private;1.0" 18 #define PPB_NACL_PRIVATE_INTERFACE_1_0 "PPB_NaCl_Private;1.0"
20 #define PPB_NACL_PRIVATE_INTERFACE PPB_NACL_PRIVATE_INTERFACE_1_0 19 #define PPB_NACL_PRIVATE_INTERFACE PPB_NACL_PRIVATE_INTERFACE_1_0
21 20
22 /** 21 /**
23 * @file 22 * @file
24 * This file contains NaCl private interfaces. This interface is not versioned 23 * This file contains NaCl private interfaces. This interface is not versioned
25 * and is for internal Chrome use. It may change without notice. */ 24 * and is for internal Chrome use. It may change without notice. */
26 25
27 26
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 struct PP_NaClFileInfo* out_file_info); 263 struct PP_NaClFileInfo* out_file_info);
265 /* This creates a temporary file that will be deleted by the time 264 /* This creates a temporary file that will be deleted by the time
266 * the last handle is closed (or earlier on POSIX systems), and 265 * the last handle is closed (or earlier on POSIX systems), and
267 * returns a posix handle to that temporary file. 266 * returns a posix handle to that temporary file.
268 */ 267 */
269 PP_FileHandle (*CreateTemporaryFile)(PP_Instance instance); 268 PP_FileHandle (*CreateTemporaryFile)(PP_Instance instance);
270 /* Return the number of processors in the system as reported by the OS */ 269 /* Return the number of processors in the system as reported by the OS */
271 int32_t (*GetNumberOfProcessors)(void); 270 int32_t (*GetNumberOfProcessors)(void);
272 /* Return whether the non-SFI mode is enabled. */ 271 /* Return whether the non-SFI mode is enabled. */
273 PP_Bool (*IsNonSFIModeEnabled)(void); 272 PP_Bool (*IsNonSFIModeEnabled)(void);
273 /* Create a temporary file, which will be deleted by the time the
274 * last handle is closed (or earlier on POSIX systems), to use for
275 * the nexe with the cache information given by |pexe_url|,
276 * |abi_version|, |opt_level|, and |headers|. If the nexe is already present
277 * in the cache, |is_hit| is set to PP_TRUE and the contents of the nexe will
278 * be copied into the temporary file. Otherwise |is_hit| is set to PP_FALSE
279 * and the temporary file will be writeable. Currently the implementation is
280 * a stub, which always sets is_hit to false and calls the implementation of
281 * CreateTemporaryFile. In a subsequent CL it will call into the browser
282 * which will remember the association between the cache key and the fd, and
283 * copy the nexe into the cache after the translation finishes.
284 */
285 int32_t (*GetNexeFd)(PP_Instance instance,
286 const char* pexe_url,
287 uint32_t abi_version,
288 uint32_t opt_level,
289 const char* headers,
290 const char* extra_flags,
291 PP_Bool* is_hit,
292 PP_FileHandle* nexe_handle,
293 struct PP_CompletionCallback callback);
274 /* Report to the browser that translation of the pexe for |instance| 294 /* Report to the browser that translation of the pexe for |instance|
275 * has finished, or aborted with an error. If |success| is true, the 295 * has finished, or aborted with an error. If |success| is true, the
276 * browser may then store the translation in the cache. The renderer 296 * browser may then store the translation in the cache. The renderer
277 * must first have called GetNexeFd for the same instance. (The browser is 297 * must first have called GetNexeFd for the same instance. (The browser is
278 * not guaranteed to store the nexe even if |success| is true; if there is 298 * not guaranteed to store the nexe even if |success| is true; if there is
279 * an error on the browser side, or the file is too big for the cache, or 299 * an error on the browser side, or the file is too big for the cache, or
280 * the browser is in incognito mode, no notification will be delivered to 300 * the browser is in incognito mode, no notification will be delivered to
281 * the plugin.) 301 * the plugin.)
282 */ 302 */
283 void (*ReportTranslationFinished)(PP_Instance instance, 303 void (*ReportTranslationFinished)(PP_Instance instance,
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 */ 409 */
390 void (*OpenManifestEntry)(PP_Instance instance, 410 void (*OpenManifestEntry)(PP_Instance instance,
391 PP_Bool is_helper_process, 411 PP_Bool is_helper_process,
392 const char* key, 412 const char* key,
393 struct PP_NaClFileInfo* file_info, 413 struct PP_NaClFileInfo* file_info,
394 struct PP_CompletionCallback callback); 414 struct PP_CompletionCallback callback);
395 /* Sets the start time for PNaCl downloading and translation to the current 415 /* Sets the start time for PNaCl downloading and translation to the current
396 * time. 416 * time.
397 */ 417 */
398 void (*SetPNaClStartTime)(PP_Instance instance); 418 void (*SetPNaClStartTime)(PP_Instance instance);
399 /* Downloads and streams a pexe file for PNaCl translation.
400 * Fetches the content at |pexe_url| for the given instance and opt_level.
401 * If a translated cached nexe is already available, |cache_hit_handle|
402 * is set and |cache_hit_callback| is called.
403 * Otherwise, |stream_callback| is called repeatedly with blocks of data
404 * as they are received. |stream_finished_callback| is called after all
405 * data has been received and dispatched to |stream_callback|.
406 */
407 void (*StreamPexe)(PP_Instance instance,
408 const char* pexe_url,
409 int32_t opt_level,
410 const struct PPP_PexeStreamHandler_1_0* stream_handler,
411 void* stream_handler_user_data);
412 }; 419 };
413 420
414 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private; 421 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private;
415 /** 422 /**
416 * @} 423 * @}
417 */ 424 */
418 425
419 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */ 426 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */
420 427
OLDNEW
« no previous file with comments | « trunk/src/ppapi/api/private/ppp_pexe_stream_handler.idl ('k') | trunk/src/ppapi/c/private/ppp_pexe_stream_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698