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

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

Issue 276423003: Pepper: Nexe downloading out of the trusted plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add PlatformFile include Created 6 years, 7 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 May 8 10:24:52 2014. */ 6 /* From private/ppb_nacl_private.idl modified Mon May 12 10:11:11 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"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 uint64_t* file_token_hi); 319 uint64_t* file_token_hi);
320 /* Dispatch a progress event on the DOM element where the given instance is 320 /* Dispatch a progress event on the DOM element where the given instance is
321 * embedded. 321 * embedded.
322 */ 322 */
323 void (*DispatchEvent)(PP_Instance instance, 323 void (*DispatchEvent)(PP_Instance instance,
324 PP_NaClEventType event_type, 324 PP_NaClEventType event_type,
325 const char* resource_url, 325 const char* resource_url,
326 PP_Bool length_is_computable, 326 PP_Bool length_is_computable,
327 uint64_t loaded_bytes, 327 uint64_t loaded_bytes,
328 uint64_t total_bytes); 328 uint64_t total_bytes);
329 /* Report that the attempt to open the nexe has finished. Opening the file
330 * may have failed, as indicated by a pp_error value that is not PP_OK or an
331 * fd of -1. Failure to stat the file to determine its length results in
332 * nexe_bytes_read being -1.
333 */
334 void (*NexeFileDidOpen)(PP_Instance instance,
335 int32_t pp_error,
336 int32_t fd,
337 int32_t http_status,
338 int64_t nexe_bytes_read,
339 const char* url,
340 int64_t time_since_open);
341 /* Report that the nexe loaded successfully. */ 329 /* Report that the nexe loaded successfully. */
342 void (*ReportLoadSuccess)(PP_Instance instance, 330 void (*ReportLoadSuccess)(PP_Instance instance,
343 const char* url, 331 const char* url,
344 uint64_t loaded_bytes, 332 uint64_t loaded_bytes,
345 uint64_t total_bytes); 333 uint64_t total_bytes);
346 /* Report an error that occured while attempting to load a nexe. */ 334 /* Report an error that occured while attempting to load a nexe. */
347 void (*ReportLoadError)(PP_Instance instance, 335 void (*ReportLoadError)(PP_Instance instance,
348 PP_NaClError error, 336 PP_NaClError error,
349 const char* error_message, 337 const char* error_message,
350 const char* console_message); 338 const char* console_message);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 struct PP_Var* ld_tool_name); 420 struct PP_Var* ld_tool_name);
433 /* PP_Var string of attributes describing the CPU features supported 421 /* PP_Var string of attributes describing the CPU features supported
434 * by the current architecture. The string is a comma-delimited list 422 * by the current architecture. The string is a comma-delimited list
435 * of attributes supported by LLVM in its -mattr= option: 423 * of attributes supported by LLVM in its -mattr= option:
436 * http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mattr */ 424 * http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mattr */
437 struct PP_Var (*GetCpuFeatureAttrs)(void); 425 struct PP_Var (*GetCpuFeatureAttrs)(void);
438 /* Posts a message to the JavaScript object for the given instance. 426 /* Posts a message to the JavaScript object for the given instance.
439 * This method may be called on any thread. 427 * This method may be called on any thread.
440 */ 428 */
441 void (*PostMessageToJavaScript)(PP_Instance instance, const char* message); 429 void (*PostMessageToJavaScript)(PP_Instance instance, const char* message);
430 /* Downloads the .nexe file at the given URL to a file, and populates
431 * |handle| with a handle to a file containing its contents. */
432 void (*DownloadNexe)(PP_Instance instance,
433 const char* url,
434 PP_FileHandle* handle,
435 struct PP_CompletionCallback callback);
442 }; 436 };
443 437
444 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private; 438 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private;
445 /** 439 /**
446 * @} 440 * @}
447 */ 441 */
448 442
449 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */ 443 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */
450 444
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698