* struct NaClChromeMainArgs *args = NaClChromeMainArgsCreate();
* // Fill out args...
* NaClAppSetDesc(nap, NACL_CHROME_DESC_BASE, NaClDescMakeCustomDesc(...));
- * NaClChromeMainLoad(nap, args);
- * NaClChromeMainStart(nap);
+ * NaClChromeMainStartApp(nap, args);
*/
/*
/* Initialize NaCl. This must be called before NaClAppCreate(). */
void NaClChromeMainInit(void);
-/* Create a new args struct containing default values. */
-struct NaClChromeMainArgs *NaClChromeMainArgsCreate(void);
-
/*
- * Prepare to launch NaCl. Returns zero on success or a non-zero error code on
- * failure.
+ * Sets a function to be called when a fatal error is logged. When the passed
+ * function is invoked, recent log messages will be passed in the data
+ * parameter, and its length in the bytes parameter.
+ * This function is only safe to call after NaClChromeMainInit().
+ *
+ * If NaClSetFatalErrorCallback() is not called, recent log messages will be
+ * written to the IMC bootstrap channel on a fatal error.
*/
-int NaClChromeMainLoad(struct NaClApp *nap,
- struct NaClChromeMainArgs *args);
+void NaClSetFatalErrorCallback(void (*func)(const char *data, size_t bytes));
-/* Start NaCl. This does not return. */
-void NaClChromeMainStart(struct NaClApp *nap);
+/* Create a new args struct containing default values. */
+struct NaClChromeMainArgs *NaClChromeMainArgsCreate(void);
-/*
- * DEPRECATED. Calls NaClChromeMainLoad and NaClChromeMainStart.
- * TODO(teravest): Remove this old interface after current users are migrated.
- */
+/* Start NaCl. This does not return. */
void NaClChromeMainStartApp(struct NaClApp *nap,
struct NaClChromeMainArgs *args);