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

Side by Side Diff: src/trusted/sel_universal/sel_universal.cc

Issue 7046064: Some small refactoring and renaming of sel_universel pepper emulation components. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years, 6 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
« no previous file with comments | « src/trusted/sel_universal/sdl_ppapi_event_translator.cc ('k') | no next file » | 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) 2011 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2011 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 // Second generation sel_universal implemented in C++ and with optional 7 // Second generation sel_universal implemented in C++ and with optional
8 // multimedia support via SDL 8 // multimedia support via SDL
9 9
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 14 matching lines...) Expand all
25 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h" 25 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h"
26 #include "native_client/src/trusted/desc/nrd_all_modules.h" 26 #include "native_client/src/trusted/desc/nrd_all_modules.h"
27 #include "native_client/src/trusted/nonnacl_util/sel_ldr_launcher.h" 27 #include "native_client/src/trusted/nonnacl_util/sel_ldr_launcher.h"
28 #include "native_client/src/trusted/reverse_service/reverse_service.h" 28 #include "native_client/src/trusted/reverse_service/reverse_service.h"
29 #include "native_client/src/trusted/sel_universal/replay_handler.h" 29 #include "native_client/src/trusted/sel_universal/replay_handler.h"
30 #include "native_client/src/trusted/sel_universal/rpc_universal.h" 30 #include "native_client/src/trusted/sel_universal/rpc_universal.h"
31 31
32 #if defined(NACL_SEL_UNIVERSAL_INCLUDE_SDL) 32 #if defined(NACL_SEL_UNIVERSAL_INCLUDE_SDL)
33 // NOTE: we need to include this so that it can "hijack" main 33 // NOTE: we need to include this so that it can "hijack" main
34 #include <SDL/SDL.h> 34 #include <SDL/SDL.h>
35 #include "native_client/src/trusted/sel_universal/multimedia_handler.h" 35 #include "native_client/src/trusted/sel_universal/pepper_emu_handler.h"
36 #endif 36 #endif
37 37
38 #include "native_client/src/trusted/service_runtime/nacl_error_code.h" 38 #include "native_client/src/trusted/service_runtime/nacl_error_code.h"
39 39
40 using std::ifstream; 40 using std::ifstream;
41 using std::map; 41 using std::map;
42 using std::string; 42 using std::string;
43 using std::vector; 43 using std::vector;
44 using nacl::DescWrapper; 44 using nacl::DescWrapper;
45 45
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 loop.AddHandler("shmem", HandlerShmem); 286 loop.AddHandler("shmem", HandlerShmem);
287 loop.AddHandler("readonly_file", HandlerReadonlyFile); 287 loop.AddHandler("readonly_file", HandlerReadonlyFile);
288 loop.AddHandler("sleep", HandlerSleep); 288 loop.AddHandler("sleep", HandlerSleep);
289 loop.AddHandler("map_shmem", HandlerMap); 289 loop.AddHandler("map_shmem", HandlerMap);
290 loop.AddHandler("save_to_file", HandlerSaveToFile); 290 loop.AddHandler("save_to_file", HandlerSaveToFile);
291 loop.AddHandler("load_from_file", HandlerLoadFromFile); 291 loop.AddHandler("load_from_file", HandlerLoadFromFile);
292 loop.AddHandler("file_size", HandlerFileSize); 292 loop.AddHandler("file_size", HandlerFileSize);
293 loop.AddHandler("sync_socket_create", HandlerSyncSocketCreate); 293 loop.AddHandler("sync_socket_create", HandlerSyncSocketCreate);
294 loop.AddHandler("sync_socket_write", HandlerSyncSocketWrite); 294 loop.AddHandler("sync_socket_write", HandlerSyncSocketWrite);
295 #if NACL_SEL_UNIVERSAL_INCLUDE_SDL 295 #if NACL_SEL_UNIVERSAL_INCLUDE_SDL
296 loop.AddHandler("sdl_initialize", HandlerSDLInitialize); 296 // obsolete names
297 loop.AddHandler("sdl_event_loop", HandlerSDLEventLoop); 297 loop.AddHandler("sdl_initialize", HandlerPepperEmuInitialize);
298 loop.AddHandler("sdl_event_loop", HandlerPepperEmuEventLoop);
299 // new names
300 loop.AddHandler("pepper_emu_initialize", HandlerPepperEmuInitialize);
301 loop.AddHandler("pepper_emu_event_loop", HandlerPepperEmuEventLoop);
298 #endif 302 #endif
299 303
300 NaClLog(1, "populating initial vars\n"); 304 NaClLog(1, "populating initial vars\n");
301 for (map<string, string>::iterator it = initial_vars.begin(); 305 for (map<string, string>::iterator it = initial_vars.begin();
302 it != initial_vars.end(); 306 it != initial_vars.end();
303 ++it) { 307 ++it) {
304 loop.SetVariable(it->first, it->second); 308 loop.SetVariable(it->first, it->second);
305 } 309 }
306 310
307 const bool success = initial_commands.size() > 0 ? 311 const bool success = initial_commands.size() > 0 ?
(...skipping 16 matching lines...) Expand all
324 NaClSrpcModuleInit(); 328 NaClSrpcModuleInit();
325 NaClNrdAllModulesInit(); 329 NaClNrdAllModulesInit();
326 330
327 int exit_status = raii_main(argc, argv); 331 int exit_status = raii_main(argc, argv);
328 332
329 NaClSrpcModuleFini(); 333 NaClSrpcModuleFini();
330 NaClNrdAllModulesFini(); 334 NaClNrdAllModulesFini();
331 335
332 return exit_status; 336 return exit_status;
333 } 337 }
OLDNEW
« no previous file with comments | « src/trusted/sel_universal/sdl_ppapi_event_translator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698