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