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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 194393002: Implement renderer process side handler of WorkerProcessMsg_CreateWorker message. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated kinuko's comment Created 6 years, 9 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 | « content/renderer/render_thread_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index f491f8b273bc19c0411b13698a0a9e323df03a17..e4cc6d7d4b1b494bb562bfdecad7d998ec3005bc 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -53,6 +53,7 @@
#include "content/common/gpu/gpu_process_launch_causes.h"
#include "content/common/resource_messages.h"
#include "content/common/view_messages.h"
+#include "content/common/worker_messages.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_paths.h"
#include "content/public/common/content_switches.h"
@@ -87,6 +88,7 @@
#include "content/renderer/renderer_webkitplatformsupport_impl.h"
#include "content/renderer/service_worker/embedded_worker_context_message_filter.h"
#include "content/renderer/service_worker/embedded_worker_dispatcher.h"
+#include "content/renderer/shared_worker/embedded_shared_worker_stub.h"
#include "grit/content_resources.h"
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_forwarding_message_filter.h"
@@ -622,6 +624,7 @@ void RenderThreadImpl::AddRoute(int32 routing_id, IPC::Listener* listener) {
void RenderThreadImpl::RemoveRoute(int32 routing_id) {
ChildThread::RemoveRoute(routing_id);
}
+
int RenderThreadImpl::GenerateRoutingID() {
int routing_id = MSG_ROUTING_NONE;
Send(new ViewHostMsg_GenerateRoutingID(&routing_id));
@@ -1163,6 +1166,7 @@ bool RenderThreadImpl::OnControlMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(ViewMsg_PurgePluginListCache, OnPurgePluginListCache)
IPC_MESSAGE_HANDLER(ViewMsg_NetworkStateChanged, OnNetworkStateChanged)
IPC_MESSAGE_HANDLER(ViewMsg_TempCrashWithData, OnTempCrashWithData)
+ IPC_MESSAGE_HANDLER(WorkerProcessMsg_CreateWorker, OnCreateNewSharedWorker)
jochen (gone - plz use gerrit) 2014/03/11 14:33:50 it's a bit confusing that the renderer now gets wo
horo 2014/03/12 03:17:07 I will clean up worker_messages.h in another cl.
#if defined(OS_ANDROID)
IPC_MESSAGE_HANDLER(ViewMsg_SetWebKitSharedTimersSuspended,
OnSetWebKitSharedTimersSuspended)
@@ -1329,6 +1333,16 @@ void RenderThreadImpl::OnUpdateScrollbarTheme(
}
#endif
+void RenderThreadImpl::OnCreateNewSharedWorker(
+ const WorkerProcessMsg_CreateWorker_Params& params) {
+ // EmbeddedSharedWorkerStub will self-destruct.
+ new EmbeddedSharedWorkerStub(params.url,
+ params.name,
+ params.content_security_policy,
+ params.security_policy_type,
+ params.route_id);
+}
+
void RenderThreadImpl::OnMemoryPressure(
base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level) {
base::allocator::ReleaseFreeMemory();
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698