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

Unified Diff: chrome/browser/renderer_host/resource_message_filter.cc

Issue 27157: Initial checkin of the out of process worker implementation.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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
Index: chrome/browser/renderer_host/resource_message_filter.cc
===================================================================
--- chrome/browser/renderer_host/resource_message_filter.cc (revision 10842)
+++ chrome/browser/renderer_host/resource_message_filter.cc (working copy)
@@ -22,6 +22,7 @@
#include "chrome/browser/renderer_host/browser_render_process_host.h"
#include "chrome/browser/renderer_host/render_widget_helper.h"
#include "chrome/browser/spellchecker.h"
+#include "chrome/browser/worker_host/worker_service.h"
#include "chrome/common/chrome_plugin_lib.h"
#include "chrome/common/chrome_plugin_util.h"
#include "chrome/common/notification_service.h"
@@ -123,6 +124,8 @@
}
ResourceMessageFilter::~ResourceMessageFilter() {
+ WorkerService::GetInstance()->RendererShutdown(this);
+
if (render_handle_)
base::CloseProcessHandle(render_handle_);
@@ -201,6 +204,10 @@
OnReceiveContextMenuMsg(message))
IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_OpenChannelToPlugin,
OnOpenChannelToPlugin)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_CreateDedicatedWorker,
+ OnCreateDedicatedWorker)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_ForwardToWorker,
+ OnForwardToWorker)
IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_SpellCheck, OnSpellCheck)
IPC_MESSAGE_HANDLER(ViewHostMsg_DnsPrefetch, OnDnsPrefetch)
IPC_MESSAGE_HANDLER(ViewHostMsg_RendererHistograms,
@@ -492,6 +499,16 @@
locale, reply_msg);
}
+void ResourceMessageFilter::OnCreateDedicatedWorker(const GURL& url,
+ int* route_id) {
+ *route_id = render_widget_helper_->GetNextRoutingID();
+ WorkerService::GetInstance()->CreateDedicatedWorker(url, this, *route_id);
+}
+
+void ResourceMessageFilter::OnForwardToWorker(const IPC::Message& message) {
+ WorkerService::GetInstance()->ForwardMessage(message);
+}
+
void ResourceMessageFilter::OnDownloadUrl(const IPC::Message& message,
const GURL& url,
const GURL& referrer) {
« no previous file with comments | « chrome/browser/renderer_host/resource_message_filter.h ('k') | chrome/browser/worker_host/worker_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698