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