| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/ppapi_plugin/ppapi_thread.h" | 5 #include "content/ppapi_plugin/ppapi_thread.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| 11 #include "base/rand_util.h" | 11 #include "base/rand_util.h" |
| 12 #include "base/stringprintf.h" | 12 #include "base/stringprintf.h" |
| 13 #include "content/common/child_process.h" | 13 #include "content/common/child_process.h" |
| 14 #include "content/ppapi_plugin/broker_process_dispatcher.h" | 14 #include "content/ppapi_plugin/broker_process_dispatcher.h" |
| 15 #include "content/ppapi_plugin/plugin_process_dispatcher.h" | 15 #include "content/ppapi_plugin/plugin_process_dispatcher.h" |
| 16 #include "content/ppapi_plugin/ppapi_webkit_thread.h" | 16 #include "content/ppapi_plugin/ppapi_webkit_thread.h" |
| 17 #include "content/public/common/content_switches.h" | 17 #include "content/public/common/content_switches.h" |
| 18 #include "content/public/common/sandbox_init.h" | 18 #include "content/public/common/sandbox_init.h" |
| 19 #include "ipc/ipc_channel_handle.h" | 19 #include "ipc/ipc_channel_handle.h" |
| 20 #include "ipc/ipc_sync_channel.h" | 20 #include "ipc/ipc_sync_channel.h" |
| 21 #include "ppapi/c/dev/ppp_network_state_dev.h" | 21 #include "ppapi/c/dev/ppp_network_state_dev.h" |
| 22 #include "ppapi/c/pp_errors.h" | 22 #include "ppapi/c/pp_errors.h" |
| 23 #include "ppapi/c/ppp.h" | 23 #include "ppapi/c/ppp.h" |
| 24 #include "ppapi/proxy/ppapi_messages.h" | 24 #include "ppapi/proxy/ppapi_messages.h" |
| 25 #include "ppapi/proxy/interface_list.h" | 25 #include "ppapi/proxy/interface_list.h" |
| 26 #include "webkit/plugins/ppapi/webkit_forwarding_impl.h" | 26 #include "webkit/plugins/ppapi/webkit_forwarding_impl.h" |
| 27 | 27 |
| 28 #if defined(OS_WIN) | 28 #if defined(OS_WIN) |
| 29 #include "sandbox/src/sandbox.h" | 29 #include "sandbox/src/sandbox.h" |
| 30 #elif defined(OS_MACOSX) |
| 31 #include "content/common/sandbox_init_mac.h" |
| 30 #endif | 32 #endif |
| 31 | 33 |
| 32 #if defined(OS_WIN) | 34 #if defined(OS_WIN) |
| 33 extern sandbox::TargetServices* g_target_services; | 35 extern sandbox::TargetServices* g_target_services; |
| 34 #else | 36 #else |
| 35 extern void* g_target_services; | 37 extern void* g_target_services; |
| 36 #endif | 38 #endif |
| 37 | 39 |
| 38 typedef int32_t (*InitializeBrokerFunc) | 40 typedef int32_t (*InitializeBrokerFunc) |
| 39 (PP_ConnectInstance_Func* connect_instance_func); | 41 (PP_ConnectInstance_Func* connect_instance_func); |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 // connection is not established. | 304 // connection is not established. |
| 303 handle->socket = base::FileDescriptor(dispatcher->TakeRendererFD(), true); | 305 handle->socket = base::FileDescriptor(dispatcher->TakeRendererFD(), true); |
| 304 if (handle->socket.fd == -1) | 306 if (handle->socket.fd == -1) |
| 305 return false; | 307 return false; |
| 306 #endif | 308 #endif |
| 307 | 309 |
| 308 // From here, the dispatcher will manage its own lifetime according to the | 310 // From here, the dispatcher will manage its own lifetime according to the |
| 309 // lifetime of the attached channel. | 311 // lifetime of the attached channel. |
| 310 return true; | 312 return true; |
| 311 } | 313 } |
| OLD | NEW |