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

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

Issue 14588009: PPAPI/NaCl: Move event dispatching from the plugin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 7 years, 1 month 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/private/ppb_nacl_private.idl ('k') | ppapi/native_client/src/trusted/plugin/plugin.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 private/ppb_nacl_private.idl modified Thu Oct 31 15:10:06 2013. */ 6 /* From private/ppb_nacl_private.idl modified Tue Nov 5 15:33:53 2013. */
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 16 matching lines...) Expand all
33 * @{ 33 * @{
34 */ 34 */
35 /** NaCl-specific errors that should be reported to the user */ 35 /** NaCl-specific errors that should be reported to the user */
36 typedef enum { 36 typedef enum {
37 /** 37 /**
38 * The manifest program element does not contain a program usable on the 38 * The manifest program element does not contain a program usable on the
39 * user's architecture 39 * user's architecture
40 */ 40 */
41 PP_NACL_MANIFEST_MISSING_ARCH = 0 41 PP_NACL_MANIFEST_MISSING_ARCH = 0
42 } PP_NaClError; 42 } PP_NaClError;
43
44 /** Event types that NaCl may use when reporting load progress or errors. */
45 typedef enum {
46 PP_NACL_EVENT_LOADSTART,
47 PP_NACL_EVENT_PROGRESS,
48 PP_NACL_EVENT_ERROR,
49 PP_NACL_EVENT_ABORT,
50 PP_NACL_EVENT_LOAD,
51 PP_NACL_EVENT_LOADEND,
52 PP_NACL_EVENT_CRASH
53 } PP_NaClEventType;
43 /** 54 /**
44 * @} 55 * @}
45 */ 56 */
46 57
47 /** 58 /**
48 * @addtogroup Interfaces 59 * @addtogroup Interfaces
49 * @{ 60 * @{
50 */ 61 */
51 /* PPB_NaCl_Private */ 62 /* PPB_NaCl_Private */
52 struct PPB_NaCl_Private_1_0 { 63 struct PPB_NaCl_Private_1_0 {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 PP_ExternalPluginResult (*ReportNaClError)(PP_Instance instance, 167 PP_ExternalPluginResult (*ReportNaClError)(PP_Instance instance,
157 PP_NaClError message_id); 168 PP_NaClError message_id);
158 /* Opens a NaCl executable file in the application's extension directory 169 /* Opens a NaCl executable file in the application's extension directory
159 * corresponding to the file URL and returns a file descriptor, or an invalid 170 * corresponding to the file URL and returns a file descriptor, or an invalid
160 * handle on failure. |metadata| is left unchanged on failure. 171 * handle on failure. |metadata| is left unchanged on failure.
161 */ 172 */
162 PP_FileHandle (*OpenNaClExecutable)(PP_Instance instance, 173 PP_FileHandle (*OpenNaClExecutable)(PP_Instance instance,
163 const char* file_url, 174 const char* file_url,
164 uint64_t* file_token_lo, 175 uint64_t* file_token_lo,
165 uint64_t* file_token_hi); 176 uint64_t* file_token_hi);
177 /* Dispatch a progress event on the DOM element where the given instance is
178 * embedded.
179 */
180 void (*DispatchEvent)(PP_Instance instance,
181 PP_NaClEventType event_type,
182 struct PP_Var resource_url,
183 PP_Bool length_is_computable,
184 uint64_t loaded_bytes,
185 uint64_t total_bytes);
166 }; 186 };
167 187
168 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private; 188 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private;
169 /** 189 /**
170 * @} 190 * @}
171 */ 191 */
172 192
173 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */ 193 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */
174 194
OLDNEW
« no previous file with comments | « ppapi/api/private/ppb_nacl_private.idl ('k') | ppapi/native_client/src/trusted/plugin/plugin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698