| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 "chrome/nacl/nacl_thread.h" | 5 #include "chrome/nacl/nacl_thread.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" |
| 7 #include "chrome/common/notification_service.h" | 8 #include "chrome/common/notification_service.h" |
| 8 #include "chrome/common/nacl_messages.h" | 9 #include "chrome/common/nacl_messages.h" |
| 9 #include "native_client/src/trusted/service_runtime/include/sys/nacl_imc_api.h" | 10 #include "native_client/src/trusted/service_runtime/include/sys/nacl_imc_api.h" |
| 10 | 11 |
| 11 int SelMain(const int desc, const NaClHandle handle); | 12 int SelMain(const int desc, const NaClHandle handle); |
| 12 | 13 |
| 13 NaClThread::NaClThread() { | 14 NaClThread::NaClThread() { |
| 14 } | 15 } |
| 15 | 16 |
| 16 NaClThread::~NaClThread() { | 17 NaClThread::~NaClThread() { |
| 17 } | 18 } |
| 18 | 19 |
| 19 NaClThread* NaClThread::current() { | 20 NaClThread* NaClThread::current() { |
| 20 return static_cast<NaClThread*>(ChildThread::current()); | 21 return static_cast<NaClThread*>(ChildThread::current()); |
| 21 } | 22 } |
| 22 | 23 |
| 23 void NaClThread::OnControlMessageReceived(const IPC::Message& msg) { | 24 void NaClThread::OnControlMessageReceived(const IPC::Message& msg) { |
| 24 IPC_BEGIN_MESSAGE_MAP(NaClThread, msg) | 25 IPC_BEGIN_MESSAGE_MAP(NaClThread, msg) |
| 25 IPC_MESSAGE_HANDLER(NaClProcessMsg_Start, OnStartSelLdr) | 26 IPC_MESSAGE_HANDLER(NaClProcessMsg_Start, OnStartSelLdr) |
| 26 IPC_END_MESSAGE_MAP() | 27 IPC_END_MESSAGE_MAP() |
| 27 } | 28 } |
| 28 | 29 |
| 29 void NaClThread::OnStartSelLdr(int channel_descriptor, | 30 void NaClThread::OnStartSelLdr(const int channel_descriptor, |
| 30 nacl::FileDescriptor handle) { | 31 const nacl::FileDescriptor handle) { |
| 31 SelMain(channel_descriptor, NATIVE_HANDLE(handle)); | 32 SelMain(channel_descriptor, NATIVE_HANDLE(handle)); |
| 32 } | 33 } |
| OLD | NEW |