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_renderer; | 49 std::vector<nacl::Handle> sockets_for_renderer; |
50 std::vector<nacl::Handle> sockets_for_sel_ldr; | 50 std::vector<nacl::Handle> sockets_for_sel_ldr; |
51 }; | 51 }; |
52 | 52 |
53 NaClProcessHost::NaClProcessHost(const std::wstring& url) | 53 NaClProcessHost::NaClProcessHost(const std::wstring& url) |
54 : BrowserChildProcessHost(NACL_LOADER_PROCESS), | 54 : BrowserChildProcessHost(NACL_LOADER_PROCESS), |
55 reply_msg_(NULL), | 55 reply_msg_(NULL), |
56 internal_(new NaClInternal()), | 56 internal_(new NaClInternal()), |
57 running_on_wow64_(false), | 57 running_on_wow64_(false), |
58 ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)) { | 58 ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)) { |
59 set_name(url); | 59 set_name(WideToUTF16Hack(url)); |
60 #if defined(OS_WIN) | 60 #if defined(OS_WIN) |
61 running_on_wow64_ = (base::win::OSInfo::GetInstance()->wow64_status() == | 61 running_on_wow64_ = (base::win::OSInfo::GetInstance()->wow64_status() == |
62 base::win::OSInfo::WOW64_ENABLED); | 62 base::win::OSInfo::WOW64_ENABLED); |
63 #endif | 63 #endif |
64 } | 64 } |
65 | 65 |
66 NaClProcessHost::~NaClProcessHost() { | 66 NaClProcessHost::~NaClProcessHost() { |
67 // 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 |
68 // 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 |
69 // file anyway. TODO(mseaborn): Make this less messy. | 69 // file anyway. TODO(mseaborn): Make this less messy. |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 } | 369 } |
370 | 370 |
371 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { | 371 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { |
372 NOTREACHED() << "Invalid message with type = " << msg.type(); | 372 NOTREACHED() << "Invalid message with type = " << msg.type(); |
373 return false; | 373 return false; |
374 } | 374 } |
375 | 375 |
376 bool NaClProcessHost::CanShutdown() { | 376 bool NaClProcessHost::CanShutdown() { |
377 return true; | 377 return true; |
378 } | 378 } |
OLD | NEW |