Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7758)

Unified Diff: chrome/renderer/render_process.cc

Issue 153002: NaCl-Chrome integration - step 1 (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/render_process.h ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_process.cc
===================================================================
--- chrome/renderer/render_process.cc (revision 27435)
+++ chrome/renderer/render_process.cc (working copy)
@@ -25,11 +25,13 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/render_messages.h"
+#include "chrome/common/nacl_types.h"
#include "chrome/common/transport_dib.h"
#include "chrome/renderer/render_view.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_message_utils.h"
#include "media/base/media.h"
+#include "native_client/src/trusted/plugin/nacl_entry_points.h"
#include "webkit/glue/webkit_glue.h"
//-----------------------------------------------------------------------------
@@ -80,6 +82,9 @@
StatisticsRecorder::set_dump_on_exit(true);
}
+ if (command_line.HasSwitch(switches::kInternalNaCl))
+ RegisterInternalNaClPlugin(RenderProcess::LaunchNaClProcess);
+
FilePath module_path;
initialized_media_library_ =
PathService::Get(base::DIR_MODULE, &module_path) &&
@@ -112,6 +117,19 @@
#endif
}
+bool RenderProcess::LaunchNaClProcess(int imc_fd,
+ nacl::Handle* handle) {
+ // TODO(gregoryd): nacl::FileDescriptor will be soon merged with
+ // base::FileDescriptor
+ nacl::FileDescriptor descriptor;
+ if (!RenderThread::current()->Send(
+ new ViewHostMsg_LaunchNaCl(imc_fd, &descriptor))) {
+ return false;
+ }
+ *handle = NATIVE_HANDLE(descriptor);
+ return true;
+}
+
// -----------------------------------------------------------------------------
// Platform specific code for dealing with bitmap transport...
« no previous file with comments | « chrome/renderer/render_process.h ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698