| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/nacl/loader/nacl_listener.h" | 5 #include "components/nacl/loader/nacl_listener.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 | 9 |
| 10 #if defined(OS_POSIX) | 10 #if defined(OS_POSIX) |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 } | 280 } |
| 281 | 281 |
| 282 IPC::ChannelHandle browser_handle; | 282 IPC::ChannelHandle browser_handle; |
| 283 IPC::ChannelHandle ppapi_renderer_handle; | 283 IPC::ChannelHandle ppapi_renderer_handle; |
| 284 | 284 |
| 285 if (params.enable_ipc_proxy) { | 285 if (params.enable_ipc_proxy) { |
| 286 browser_handle = IPC::Channel::GenerateVerifiedChannelID("nacl"); | 286 browser_handle = IPC::Channel::GenerateVerifiedChannelID("nacl"); |
| 287 ppapi_renderer_handle = IPC::Channel::GenerateVerifiedChannelID("nacl"); | 287 ppapi_renderer_handle = IPC::Channel::GenerateVerifiedChannelID("nacl"); |
| 288 | 288 |
| 289 #if defined(OS_LINUX) | 289 #if defined(OS_LINUX) |
| 290 if (params.enable_nonsfi_mode) { | 290 if (params.uses_nonsfi_mode) { |
| 291 // In non-SFI mode, we neither intercept nor rewrite the message using | 291 // In non-SFI mode, we neither intercept nor rewrite the message using |
| 292 // NaClIPCAdapter, and the channels are connected between the plugin and | 292 // NaClIPCAdapter, and the channels are connected between the plugin and |
| 293 // the hosts directly. So, the IPC::Channel instances will be created in | 293 // the hosts directly. So, the IPC::Channel instances will be created in |
| 294 // the plugin side, because the IPC::Listener needs to live on the | 294 // the plugin side, because the IPC::Listener needs to live on the |
| 295 // plugin's main thread. However, on initialization (i.e. before loading | 295 // plugin's main thread. However, on initialization (i.e. before loading |
| 296 // the plugin binary), the FD needs to be passed to the hosts. So, here | 296 // the plugin binary), the FD needs to be passed to the hosts. So, here |
| 297 // we create raw FD pairs, and pass the client side FDs to the hosts, | 297 // we create raw FD pairs, and pass the client side FDs to the hosts, |
| 298 // and the server side FDs to the plugin. | 298 // and the server side FDs to the plugin. |
| 299 int browser_server_ppapi_fd; | 299 int browser_server_ppapi_fd; |
| 300 int browser_client_ppapi_fd; | 300 int browser_client_ppapi_fd; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 #endif | 409 #endif |
| 410 #if defined(OS_WIN) | 410 #if defined(OS_WIN) |
| 411 args->broker_duplicate_handle_func = BrokerDuplicateHandle; | 411 args->broker_duplicate_handle_func = BrokerDuplicateHandle; |
| 412 args->attach_debug_exception_handler_func = AttachDebugExceptionHandler; | 412 args->attach_debug_exception_handler_func = AttachDebugExceptionHandler; |
| 413 #endif | 413 #endif |
| 414 #if defined(OS_LINUX) | 414 #if defined(OS_LINUX) |
| 415 args->prereserved_sandbox_size = prereserved_sandbox_size_; | 415 args->prereserved_sandbox_size = prereserved_sandbox_size_; |
| 416 #endif | 416 #endif |
| 417 | 417 |
| 418 #if defined(OS_LINUX) | 418 #if defined(OS_LINUX) |
| 419 if (params.enable_nonsfi_mode) { | 419 if (params.uses_nonsfi_mode) { |
| 420 nacl::nonsfi::MainStart(args->imc_bootstrap_handle); | 420 nacl::nonsfi::MainStart(args->imc_bootstrap_handle); |
| 421 NOTREACHED(); | 421 NOTREACHED(); |
| 422 return; | 422 return; |
| 423 } | 423 } |
| 424 #endif | 424 #endif |
| 425 NaClChromeMainStartApp(nap, args); | 425 NaClChromeMainStartApp(nap, args); |
| 426 NOTREACHED(); | 426 NOTREACHED(); |
| 427 } | 427 } |
| OLD | NEW |