| 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 #include <map> | 5 #include <map> |
| 6 #include <set> | 6 #include <set> |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 // Need to include this before most other files because it defines | 9 // Need to include this before most other files because it defines |
| 10 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define | 10 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "native_client/src/shared/srpc/nacl_srpc.h" | 21 #include "native_client/src/shared/srpc/nacl_srpc.h" |
| 22 #include "native_client/src/untrusted/irt/irt_ppapi.h" | 22 #include "native_client/src/untrusted/irt/irt_ppapi.h" |
| 23 #include "ppapi/c/ppp.h" | 23 #include "ppapi/c/ppp.h" |
| 24 #include "ppapi/c/ppp_instance.h" | 24 #include "ppapi/c/ppp_instance.h" |
| 25 #include "ppapi/proxy/plugin_dispatcher.h" | 25 #include "ppapi/proxy/plugin_dispatcher.h" |
| 26 #include "ppapi/proxy/plugin_globals.h" | 26 #include "ppapi/proxy/plugin_globals.h" |
| 27 #include "ppapi/proxy/plugin_proxy_delegate.h" | 27 #include "ppapi/proxy/plugin_proxy_delegate.h" |
| 28 #include "ppapi/shared_impl/ppb_audio_shared.h" | 28 #include "ppapi/shared_impl/ppb_audio_shared.h" |
| 29 | 29 |
| 30 #if defined(IPC_MESSAGE_LOG_ENABLED) | 30 #if defined(IPC_MESSAGE_LOG_ENABLED) |
| 31 #include "base/hash_tables.h" |
| 32 |
| 33 LogFunctionMap g_log_function_mapping; |
| 34 |
| 31 #define IPC_MESSAGE_MACROS_LOG_ENABLED | 35 #define IPC_MESSAGE_MACROS_LOG_ENABLED |
| 36 #define IPC_LOG_TABLE_ADD_ENTRY(msg_id, logger) \ |
| 37 g_log_function_mapping[msg_id] = logger |
| 38 |
| 32 #endif | 39 #endif |
| 33 #include "ppapi/proxy/ppapi_messages.h" | 40 #include "ppapi/proxy/ppapi_messages.h" |
| 34 | 41 |
| 35 // This must match up with NACL_CHROME_INITIAL_IPC_DESC, | 42 // This must match up with NACL_CHROME_INITIAL_IPC_DESC, |
| 36 // defined in sel_main_chrome.h | 43 // defined in sel_main_chrome.h |
| 37 #define NACL_IPC_FD 6 | 44 #define NACL_IPC_FD 6 |
| 38 | 45 |
| 39 using ppapi::proxy::PluginDispatcher; | 46 using ppapi::proxy::PluginDispatcher; |
| 40 using ppapi::proxy::PluginGlobals; | 47 using ppapi::proxy::PluginGlobals; |
| 41 using ppapi::proxy::PluginProxyDelegate; | 48 using ppapi::proxy::PluginProxyDelegate; |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 | 260 |
| 254 PpapiDispatcher ppapi_dispatcher(io_thread.message_loop_proxy()); | 261 PpapiDispatcher ppapi_dispatcher(io_thread.message_loop_proxy()); |
| 255 plugin_globals.set_plugin_proxy_delegate(&ppapi_dispatcher); | 262 plugin_globals.set_plugin_proxy_delegate(&ppapi_dispatcher); |
| 256 | 263 |
| 257 loop.Run(); | 264 loop.Run(); |
| 258 | 265 |
| 259 NaClSrpcModuleFini(); | 266 NaClSrpcModuleFini(); |
| 260 | 267 |
| 261 return 0; | 268 return 0; |
| 262 } | 269 } |
| OLD | NEW |