diff options
author | gregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-26 02:22:17 +0000 |
---|---|---|
committer | gregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-26 02:22:17 +0000 |
commit | 37e1bb64e696f39acb8a80021af58356af8e3bf1 (patch) | |
tree | 32b249c3356c2620b5d22858e3c19c14a430955e /chrome/renderer | |
parent | 8e8503072f1bf91c59b15b54274ec907505b0376 (diff) | |
download | chromium_src-37e1bb64e696f39acb8a80021af58356af8e3bf1.zip chromium_src-37e1bb64e696f39acb8a80021af58356af8e3bf1.tar.gz chromium_src-37e1bb64e696f39acb8a80021af58356af8e3bf1.tar.bz2 |
Revert 27315 - First step towards NaClChrome integration:1. NaCl plugin becomes a builtin plugin in Chrome and runs in the renderer process.2. Most of the changes are related to launching the NaCl process (that loads and runs the NaCl module) and establishing the initial communication between that process and the NaCl plugin.3. Command line flag "internalnacl" is required to enable the builtin NaCl plugin. NaCl still cannot run in Chrome sandbox, the flag automatically disables the sandbox
Review URL: http://codereview.chromium.org/153002
TBR=gregoryd@google.com
Review URL: http://codereview.chromium.org/244014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27317 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/render_process.cc | 18 | ||||
-rw-r--r-- | chrome/renderer/render_process.h | 5 | ||||
-rw-r--r-- | chrome/renderer/render_view.cc | 8 |
3 files changed, 1 insertions, 30 deletions
diff --git a/chrome/renderer/render_process.cc b/chrome/renderer/render_process.cc index 0c579ea..610e5d3 100644 --- a/chrome/renderer/render_process.cc +++ b/chrome/renderer/render_process.cc @@ -25,13 +25,11 @@ #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" //----------------------------------------------------------------------------- @@ -82,9 +80,6 @@ RenderProcess::RenderProcess() 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) && @@ -117,19 +112,6 @@ bool RenderProcess::InProcessPlugins() { #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... diff --git a/chrome/renderer/render_process.h b/chrome/renderer/render_process.h index 0ab9996..d445fbe 100644 --- a/chrome/renderer/render_process.h +++ b/chrome/renderer/render_process.h @@ -8,7 +8,6 @@ #include "base/timer.h" #include "chrome/common/child_process.h" #include "chrome/renderer/render_thread.h" -#include "native_client/src/shared/imc/nacl_imc.h" #include "skia/ext/platform_canvas.h" namespace gfx { @@ -52,10 +51,6 @@ class RenderProcess : public ChildProcess { // Just like in_process_plugins(), but called before RenderProcess is created. static bool InProcessPlugins(); - // Sends a message to the browser process asking to launch a new NaCl process. - // Called from NaCl plugin code. - static bool LaunchNaClProcess(int imc_fd, nacl::Handle *handle); - private: // Look in the shared memory cache for a suitable object to reuse. // result: (output) the memory found diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 2d2407d..842dfc0 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -2357,13 +2357,7 @@ webkit_glue::WebPluginDelegate* RenderView::CreatePluginDelegate( else mime_type_to_use = &mime_type; - bool in_process_plugin = RenderProcess::current()->in_process_plugins(); - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInternalNaCl)) { - if (mime_type == "application/x-nacl-srpc") { - in_process_plugin = true; - } - } - if (in_process_plugin) { + if (RenderProcess::current()->in_process_plugins()) { #if defined(OS_WIN) // In-proc plugins aren't supported on Linux or Mac. return WebPluginDelegateImpl::Create( path, *mime_type_to_use, gfx::NativeViewFromId(host_window_)); |