| 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #include "chrome/browser/nacl_host/nacl_process_host.h" | 7 #include "chrome/browser/nacl_host/nacl_process_host.h" |
| 8 | 8 |
| 9 #if defined(OS_POSIX) | 9 #if defined(OS_POSIX) |
| 10 #include <fcntl.h> | 10 #include <fcntl.h> |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 return; | 301 return; |
| 302 } | 302 } |
| 303 #else | 303 #else |
| 304 // We use pid as process handle on Posix | 304 // We use pid as process handle on Posix |
| 305 nacl_process_handle = handle(); | 305 nacl_process_handle = handle(); |
| 306 #endif | 306 #endif |
| 307 | 307 |
| 308 // Get the pid of the NaCl process | 308 // Get the pid of the NaCl process |
| 309 base::ProcessId nacl_process_id = base::GetProcId(handle()); | 309 base::ProcessId nacl_process_id = base::GetProcId(handle()); |
| 310 | 310 |
| 311 ViewHostMsg_LaunchNaCl::WriteReplyParams( | 311 ChromeViewHostMsg_LaunchNaCl::WriteReplyParams( |
| 312 reply_msg_, handles_for_renderer, nacl_process_handle, nacl_process_id); | 312 reply_msg_, handles_for_renderer, nacl_process_handle, nacl_process_id); |
| 313 chrome_render_message_filter_->Send(reply_msg_); | 313 chrome_render_message_filter_->Send(reply_msg_); |
| 314 chrome_render_message_filter_ = NULL; | 314 chrome_render_message_filter_ = NULL; |
| 315 reply_msg_ = NULL; | 315 reply_msg_ = NULL; |
| 316 internal_->sockets_for_renderer.clear(); | 316 internal_->sockets_for_renderer.clear(); |
| 317 | 317 |
| 318 std::vector<nacl::FileDescriptor> handles_for_sel_ldr; | 318 std::vector<nacl::FileDescriptor> handles_for_sel_ldr; |
| 319 for (size_t i = 0; i < internal_->sockets_for_sel_ldr.size(); i++) { | 319 for (size_t i = 0; i < internal_->sockets_for_sel_ldr.size(); i++) { |
| 320 #if defined(OS_WIN) | 320 #if defined(OS_WIN) |
| 321 HANDLE channel; | 321 HANDLE channel; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 } | 368 } |
| 369 | 369 |
| 370 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { | 370 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { |
| 371 NOTREACHED() << "Invalid message with type = " << msg.type(); | 371 NOTREACHED() << "Invalid message with type = " << msg.type(); |
| 372 return false; | 372 return false; |
| 373 } | 373 } |
| 374 | 374 |
| 375 bool NaClProcessHost::CanShutdown() { | 375 bool NaClProcessHost::CanShutdown() { |
| 376 return true; | 376 return true; |
| 377 } | 377 } |
| OLD | NEW |