OLD | NEW |
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 #include "hello_nacl_mounts.h" | 6 #include "hello_nacl_io.h" |
7 | 7 |
8 #include <assert.h> | 8 #include <assert.h> |
9 #include <stdio.h> | 9 #include <stdio.h> |
10 #include <stdlib.h> | 10 #include <stdlib.h> |
11 #include <string.h> | 11 #include <string.h> |
12 #include <pthread.h> | 12 #include <pthread.h> |
13 | 13 |
14 #include "ppapi/c/pp_errors.h" | 14 #include "ppapi/c/pp_errors.h" |
15 #include "ppapi/c/pp_module.h" | 15 #include "ppapi/c/pp_module.h" |
16 #include "ppapi/c/ppb.h" | 16 #include "ppapi/c/ppb.h" |
17 #include "ppapi/c/ppb_instance.h" | 17 #include "ppapi/c/ppb_instance.h" |
18 #include "ppapi/c/ppb_messaging.h" | 18 #include "ppapi/c/ppb_messaging.h" |
19 #include "ppapi/c/ppb_var.h" | 19 #include "ppapi/c/ppb_var.h" |
20 #include "ppapi/c/ppp.h" | 20 #include "ppapi/c/ppp.h" |
21 #include "ppapi/c/ppp_instance.h" | 21 #include "ppapi/c/ppp_instance.h" |
22 #include "ppapi/c/ppp_messaging.h" | 22 #include "ppapi/c/ppp_messaging.h" |
23 #include "nacl_mounts/nacl_mounts.h" | 23 #include "nacl_io/nacl_io.h" |
24 | 24 |
25 #include "handlers.h" | 25 #include "handlers.h" |
26 #include "queue.h" | 26 #include "queue.h" |
27 | 27 |
28 #define MIN(a, b) (((a) < (b)) ? (a) : (b)) | 28 #define MIN(a, b) (((a) < (b)) ? (a) : (b)) |
29 | 29 |
30 #if defined(WIN32) | 30 #if defined(WIN32) |
31 #define va_copy(d, s) ((d) = (s)) | 31 #define va_copy(d, s) ((d) = (s)) |
32 #endif | 32 #endif |
33 | 33 |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 free(message); | 268 free(message); |
269 } | 269 } |
270 } | 270 } |
271 | 271 |
272 | 272 |
273 static PP_Bool Instance_DidCreate(PP_Instance instance, | 273 static PP_Bool Instance_DidCreate(PP_Instance instance, |
274 uint32_t argc, | 274 uint32_t argc, |
275 const char* argn[], | 275 const char* argn[], |
276 const char* argv[]) { | 276 const char* argv[]) { |
277 g_instance = instance; | 277 g_instance = instance; |
278 nacl_mounts_init_ppapi(instance, get_browser_interface); | 278 nacl_io_init_ppapi(instance, get_browser_interface); |
279 mount( | 279 mount( |
280 "", /* source */ | 280 "", /* source */ |
281 "/persistent", /* target */ | 281 "/persistent", /* target */ |
282 "html5fs", /* filesystemtype */ | 282 "html5fs", /* filesystemtype */ |
283 0, /* mountflags */ | 283 0, /* mountflags */ |
284 "type=PERSISTENT,expected_size=1048576"); /* data */ | 284 "type=PERSISTENT,expected_size=1048576"); /* data */ |
285 | 285 |
286 mount( | 286 mount( |
287 "", /* source. Use relative URL */ | 287 "", /* source. Use relative URL */ |
288 "/http", /* target */ | 288 "/http", /* target */ |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 &Messaging_HandleMessage, | 352 &Messaging_HandleMessage, |
353 }; | 353 }; |
354 return &messaging_interface; | 354 return &messaging_interface; |
355 } | 355 } |
356 return NULL; | 356 return NULL; |
357 } | 357 } |
358 | 358 |
359 | 359 |
360 PP_EXPORT void PPP_ShutdownModule() { | 360 PP_EXPORT void PPP_ShutdownModule() { |
361 } | 361 } |
OLD | NEW |