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