diff options
Diffstat (limited to 'chrome/nacl')
-rw-r--r-- | chrome/nacl/nacl_thread.cc | 11 | ||||
-rw-r--r-- | chrome/nacl/nacl_thread.h | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/chrome/nacl/nacl_thread.cc b/chrome/nacl/nacl_thread.cc index 33c0195..77b78c7 100644 --- a/chrome/nacl/nacl_thread.cc +++ b/chrome/nacl/nacl_thread.cc @@ -36,8 +36,11 @@ void NaClThread::OnControlMessageReceived(const IPC::Message& msg) { IPC_END_MESSAGE_MAP() } -void NaClThread::OnStartSelLdr(int channel_descriptor, - nacl::FileDescriptor handle) { - NaClHandle nacl_handle = nacl::ToNativeHandle(handle); - NaClMainForChromium(/* handle_count= */ 1, &nacl_handle); +void NaClThread::OnStartSelLdr(std::vector<nacl::FileDescriptor> handles) { + NaClHandle* array = new NaClHandle[handles.size()]; + for (size_t i = 0; i < handles.size(); i++) { + array[i] = nacl::ToNativeHandle(handles[i]); + } + NaClMainForChromium(static_cast<int>(handles.size()), array); + delete array; } diff --git a/chrome/nacl/nacl_thread.h b/chrome/nacl/nacl_thread.h index 70bfe6f..33cccae 100644 --- a/chrome/nacl/nacl_thread.h +++ b/chrome/nacl/nacl_thread.h @@ -22,7 +22,7 @@ class NaClThread : public ChildThread { private: virtual void OnControlMessageReceived(const IPC::Message& msg); - void OnStartSelLdr(int channel_descriptor, nacl::FileDescriptor handle); + void OnStartSelLdr(std::vector<nacl::FileDescriptor> handles); // TODO(gregoryd): do we need to override Cleanup as in PluginThread? DISALLOW_COPY_AND_ASSIGN(NaClThread); |