Chromium Code Reviews| Index: chrome/renderer/renderer_glue.cc |
| =================================================================== |
| --- chrome/renderer/renderer_glue.cc (revision 69335) |
| +++ chrome/renderer/renderer_glue.cc (working copy) |
| @@ -28,6 +28,8 @@ |
| #include "chrome/renderer/render_process.h" |
| #include "chrome/renderer/render_thread.h" |
| #include "googleurl/src/url_util.h" |
| +#include "native_client/src/shared/imc/nacl_imc.h" |
|
noelallen_use_chromium
2010/12/17 19:52:22
#ifdef this as well? So that someone could compil
|
| +#include "native_client/src/trusted/plugin/nacl_entry_points.h" |
| #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" |
| #include "third_party/WebKit/WebKit/chromium/public/WebKitClient.h" |
| #include "third_party/WebKit/WebKit/chromium/public/WebString.h" |
| @@ -274,6 +276,30 @@ |
| new ViewHostMsg_UserMetricsRecordAction(action)); |
| } |
| +#if !defined(DISABLE_NACL) |
| +bool LaunchSelLdr(const char* alleged_url, int socket_count, void* imc_handles, |
| + void* nacl_process_handle, int* nacl_process_id) { |
| + std::vector<nacl::FileDescriptor> sockets; |
| + base::ProcessHandle nacl_process; |
| + if (!RenderThread::current()->Send( |
| + new ViewHostMsg_LaunchNaCl( |
| + ASCIIToWide(alleged_url), |
| + socket_count, |
| + &sockets, |
| + &nacl_process, |
| + reinterpret_cast<base::ProcessId*>(nacl_process_id)))) { |
| + return false; |
| + } |
| + CHECK(static_cast<int>(sockets.size()) == socket_count); |
| + for (int i = 0; i < socket_count; i++) { |
| + static_cast<nacl::Handle*>(imc_handles)[i] = |
| + nacl::ToNativeHandle(sockets[i]); |
| + } |
| + *static_cast<nacl::Handle*>(nacl_process_handle) = nacl_process; |
| + return true; |
| +} |
| +#endif |
| + |
| #if defined(OS_LINUX) |
| int MatchFontWithFallback(const std::string& face, bool bold, |
| bool italic, int charset) { |