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

Side by Side Diff: src/public/chrome_main.h

Issue 1089323006: Add a load_status callback hook that is invoked at the end of chrome LoadApp. (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: reorder events Created 5 years, 8 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
« no previous file with comments | « no previous file | src/trusted/service_runtime/sel_main_chrome.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 #ifndef NATIVE_CLIENT_SRC_PUBLIC_CHROME_MAIN_H_ 7 #ifndef NATIVE_CLIENT_SRC_PUBLIC_CHROME_MAIN_H_
8 #define NATIVE_CLIENT_SRC_PUBLIC_CHROME_MAIN_H_ 1 8 #define NATIVE_CLIENT_SRC_PUBLIC_CHROME_MAIN_H_ 1
9 9
10 #include "native_client/src/include/build_config.h" 10 #include "native_client/src/include/build_config.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 void NaClChromeMainInit(void); 227 void NaClChromeMainInit(void);
228 228
229 /* 229 /*
230 * Sets a function to be called when a fatal error is logged. When the passed 230 * Sets a function to be called when a fatal error is logged. When the passed
231 * function is invoked, recent log messages will be passed in the data 231 * function is invoked, recent log messages will be passed in the data
232 * parameter, and its length in the bytes parameter. 232 * parameter, and its length in the bytes parameter.
233 * This function is only safe to call after NaClChromeMainInit(). 233 * This function is only safe to call after NaClChromeMainInit().
234 */ 234 */
235 void NaClSetFatalErrorCallback(void (*func)(const char *data, size_t bytes)); 235 void NaClSetFatalErrorCallback(void (*func)(const char *data, size_t bytes));
236 236
237 /*
238 * Sets a function to be called when the initial module load status
239 * from a call to NaClChromeMainStart is known (load_status is a value from
240 * the the NaClErrorCode enumeration and may indicate success or error).
241 */
242 void NaClSetLoadStatusCallback(void (*func)(int load_status));
Mark Seaborn 2015/04/17 23:15:54 Can you make this callback a field in NaClChromeMa
jvoung (off chromium) 2015/04/18 00:58:17 Done -- ah, didn't realize why that was global.
243
237 /* Create a new args struct containing default values. */ 244 /* Create a new args struct containing default values. */
238 struct NaClChromeMainArgs *NaClChromeMainArgsCreate(void); 245 struct NaClChromeMainArgs *NaClChromeMainArgsCreate(void);
239 246
240 /* 247 /*
241 * Start NaCl. 248 * Start NaCl.
242 * On success, returns 1 and sets exit_status to the value that the application 249 * On success, returns 1 and sets exit_status to the value that the application
243 * passed to _exit(). 250 * passed to _exit().
244 * Returns 0 if the application fails to start. 251 * Returns 0 if the application fails to start.
245 */ 252 */
246 int NaClChromeMainStart(struct NaClApp *nap, 253 int NaClChromeMainStart(struct NaClApp *nap,
247 struct NaClChromeMainArgs *args, 254 struct NaClChromeMainArgs *args,
248 int *exit_status); 255 int *exit_status);
249 256
250 /* 257 /*
251 * NaClExit() is for doing a graceful exit, when no internal errors 258 * NaClExit() is for doing a graceful exit, when no internal errors
252 * have been detected, when the caller wants to return a well-defined 259 * have been detected, when the caller wants to return a well-defined
253 * exit status. 260 * exit status.
254 * 261 *
255 * This is safer than exit(), which does some teardown that can cause running 262 * This is safer than exit(), which does some teardown that can cause running
256 * threads to crash. 263 * threads to crash.
257 */ 264 */
258 void NaClExit(int code); 265 void NaClExit(int code);
259 266
260 EXTERN_C_END 267 EXTERN_C_END
261 268
262 #endif 269 #endif
OLDNEW
« no previous file with comments | « no previous file | src/trusted/service_runtime/sel_main_chrome.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698