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