OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ppapi/proxy/plugin_main_irt.h" | 5 #include "ppapi/proxy/plugin_main_irt.h" |
6 | 6 |
7 #include <unistd.h> | 7 #include <unistd.h> |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 | 309 |
310 } // namespace | 310 } // namespace |
311 | 311 |
312 void SetIPCFileDescriptors(int ipc_browser_fd, int ipc_renderer_fd) { | 312 void SetIPCFileDescriptors(int ipc_browser_fd, int ipc_renderer_fd) { |
313 g_nacl_ipc_browser_fd = ipc_browser_fd; | 313 g_nacl_ipc_browser_fd = ipc_browser_fd; |
314 g_nacl_ipc_renderer_fd = ipc_renderer_fd; | 314 g_nacl_ipc_renderer_fd = ipc_renderer_fd; |
315 } | 315 } |
316 | 316 |
317 void PpapiPluginRegisterThreadCreator( | 317 void PpapiPluginRegisterThreadCreator( |
318 const struct PP_ThreadFunctions* thread_functions) { | 318 const struct PP_ThreadFunctions* thread_functions) { |
319 #if defined(__native_client__) | |
320 // TODO(hidehiko): The thread creation for the PPB_Audio is not yet | |
321 // implemented on non-SFI mode. Support this. Now, this function invocation | |
322 // is just ignored. | |
323 | |
324 // Initialize all classes that need to create threads that call back into | 319 // Initialize all classes that need to create threads that call back into |
325 // user code. | 320 // user code. |
326 ppapi::PPB_Audio_Shared::SetThreadFunctions(thread_functions); | 321 ppapi::PPB_Audio_Shared::SetThreadFunctions(thread_functions); |
327 #endif | |
328 } | 322 } |
329 | 323 |
330 int PpapiPluginMain() { | 324 int PpapiPluginMain() { |
331 base::MessageLoop loop; | 325 base::MessageLoop loop; |
332 #if defined(IPC_MESSAGE_LOG_ENABLED) | 326 #if defined(IPC_MESSAGE_LOG_ENABLED) |
333 IPC::Logging::set_log_function_map(&g_log_function_mapping); | 327 IPC::Logging::set_log_function_map(&g_log_function_mapping); |
334 #endif | 328 #endif |
335 ppapi::proxy::PluginGlobals plugin_globals; | 329 ppapi::proxy::PluginGlobals plugin_globals; |
336 base::Thread* io_thread = GetNaClIOThread(); | 330 base::Thread* io_thread = GetNaClIOThread(); |
337 | 331 |
(...skipping 11 matching lines...) Expand all Loading... |
349 } | 343 } |
350 #endif | 344 #endif |
351 | 345 |
352 PpapiDispatcher ppapi_dispatcher(io_thread->message_loop_proxy()); | 346 PpapiDispatcher ppapi_dispatcher(io_thread->message_loop_proxy()); |
353 plugin_globals.set_plugin_proxy_delegate(&ppapi_dispatcher); | 347 plugin_globals.set_plugin_proxy_delegate(&ppapi_dispatcher); |
354 | 348 |
355 loop.Run(); | 349 loop.Run(); |
356 | 350 |
357 return 0; | 351 return 0; |
358 } | 352 } |
OLD | NEW |