| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 NaClProcessHost::NaClProcessHost( | 52 NaClProcessHost::NaClProcessHost( |
| 53 ResourceDispatcherHost *resource_dispatcher_host, | 53 ResourceDispatcherHost *resource_dispatcher_host, |
| 54 const std::wstring& url) | 54 const std::wstring& url) |
| 55 : BrowserChildProcessHost(NACL_LOADER_PROCESS, resource_dispatcher_host), | 55 : BrowserChildProcessHost(NACL_LOADER_PROCESS, resource_dispatcher_host), |
| 56 resource_dispatcher_host_(resource_dispatcher_host), | 56 resource_dispatcher_host_(resource_dispatcher_host), |
| 57 reply_msg_(NULL), | 57 reply_msg_(NULL), |
| 58 internal_(new NaClInternal()), | 58 internal_(new NaClInternal()), |
| 59 running_on_wow64_(false) { | 59 running_on_wow64_(false) { |
| 60 set_name(url); | 60 set_name(url); |
| 61 #if defined(OS_WIN) | 61 #if defined(OS_WIN) |
| 62 running_on_wow64_ = (base::win::GetWOW64Status() == base::win::WOW64_ENABLED); | 62 running_on_wow64_ = (base::win::OSInfo::GetInstance()->wow64_status() == |
| 63 base::win::OSInfo::WOW64_ENABLED); |
| 63 #endif | 64 #endif |
| 64 } | 65 } |
| 65 | 66 |
| 66 NaClProcessHost::~NaClProcessHost() { | 67 NaClProcessHost::~NaClProcessHost() { |
| 67 if (!reply_msg_) | 68 if (!reply_msg_) |
| 68 return; | 69 return; |
| 69 | 70 |
| 70 // nacl::Close() is not available at link time if DISABLE_NACL is | 71 // nacl::Close() is not available at link time if DISABLE_NACL is |
| 71 // defined, but we still compile a bunch of other code from this | 72 // defined, but we still compile a bunch of other code from this |
| 72 // file anyway. TODO(mseaborn): Make this less messy. | 73 // file anyway. TODO(mseaborn): Make this less messy. |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 } | 297 } |
| 297 | 298 |
| 298 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { | 299 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { |
| 299 NOTREACHED() << "Invalid message with type = " << msg.type(); | 300 NOTREACHED() << "Invalid message with type = " << msg.type(); |
| 300 return false; | 301 return false; |
| 301 } | 302 } |
| 302 | 303 |
| 303 bool NaClProcessHost::CanShutdown() { | 304 bool NaClProcessHost::CanShutdown() { |
| 304 return true; | 305 return true; |
| 305 } | 306 } |
| OLD | NEW |