diff options
author | gregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-29 00:33:46 +0000 |
---|---|---|
committer | gregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-29 00:33:46 +0000 |
commit | d032f495aa168d053b8012193ecad0a60dde2595 (patch) | |
tree | b0f2952d2f68108b37ace6eaadb5bc4dd5ad0b1c /chrome/browser/renderer_host | |
parent | bc1407f95bae3d7472ee0c85ef83ee10610b3f1f (diff) | |
download | chromium_src-d032f495aa168d053b8012193ecad0a60dde2595.zip chromium_src-d032f495aa168d053b8012193ecad0a60dde2595.tar.gz chromium_src-d032f495aa168d053b8012193ecad0a60dde2595.tar.bz2 |
First step towards NaCl-Chrome integration:1. NaCl plugin becomes a built-in 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 "--internal-nacl" is required to enable the built-in NaCl plugin. NaCl still cannot run in Chrome sandbox, the flag automatically disables the sandboxCommitted: http://src.chromium.org/viewvc/chrome?view=rev&revision=27315
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=27324
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=27397
Review URL: http://codereview.chromium.org/153002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27445 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
3 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc index 676f8ce..159a190 100644 --- a/chrome/browser/renderer_host/browser_render_process_host.cc +++ b/chrome/browser/renderer_host/browser_render_process_host.cc @@ -329,6 +329,7 @@ bool BrowserRenderProcessHost::Init() { switches::kDisableAudio, switches::kSimpleDataSource, switches::kEnableBenchmarking, + switches::kInternalNaCl, switches::kEnableDatabases, }; diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc index 44032b1..a7d9360 100644 --- a/chrome/browser/renderer_host/resource_message_filter.cc +++ b/chrome/browser/renderer_host/resource_message_filter.cc @@ -15,6 +15,7 @@ #include "chrome/browser/chrome_thread.h" #include "chrome/browser/extensions/extension_message_service.h" #include "chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h" +#include "chrome/browser/nacl_process_host.h" #include "chrome/browser/net/chrome_url_request_context.h" #include "chrome/browser/net/dns_global.h" #include "chrome/browser/plugin_service.h" @@ -295,6 +296,7 @@ bool ResourceMessageFilter::OnMessageReceived(const IPC::Message& msg) { OnReceiveContextMenuMsg(msg)) IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_OpenChannelToPlugin, OnOpenChannelToPlugin) + IPC_MESSAGE_HANDLER(ViewHostMsg_LaunchNaCl, OnLaunchNaCl) IPC_MESSAGE_HANDLER(ViewHostMsg_CreateDedicatedWorker, OnCreateDedicatedWorker) IPC_MESSAGE_HANDLER(ViewHostMsg_CancelCreateDedicatedWorker, @@ -583,6 +585,12 @@ void ResourceMessageFilter::OnOpenChannelToPlugin(const GURL& url, this, url, mime_type, locale, reply_msg); } +void ResourceMessageFilter::OnLaunchNaCl(int channel_descriptor, + nacl::FileDescriptor* handle) { + NaClProcessHost* nacl_host = new NaClProcessHost(resource_dispatcher_host_); + nacl_host->Launch(this, channel_descriptor, handle); +} + void ResourceMessageFilter::OnCreateDedicatedWorker(const GURL& url, int render_view_route_id, int* route_id) { diff --git a/chrome/browser/renderer_host/resource_message_filter.h b/chrome/browser/renderer_host/resource_message_filter.h index 2e54492..97b3eb7 100644 --- a/chrome/browser/renderer_host/resource_message_filter.h +++ b/chrome/browser/renderer_host/resource_message_filter.h @@ -24,6 +24,7 @@ #include "chrome/browser/net/resolve_proxy_msg_helper.h" #include "chrome/browser/renderer_host/render_widget_helper.h" #include "chrome/browser/renderer_host/resource_dispatcher_host.h" +#include "chrome/common/nacl_types.h" #include "chrome/common/notification_registrar.h" #include "chrome/common/transport_dib.h" #include "ipc/ipc_channel_proxy.h" @@ -152,6 +153,8 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter, const std::string& mime_type, const std::wstring& locale, IPC::Message* reply_msg); + void OnLaunchNaCl(int channel_descriptor, + nacl::FileDescriptor* handle); void OnCreateDedicatedWorker(const GURL& url, int render_view_route_id, int* route_id); |