Index: content/child/service_worker/embedded_worker_stub.cc |
diff --git a/content/child/service_worker/embedded_worker_stub.cc b/content/child/service_worker/embedded_worker_stub.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8c8e706acc728e51a4fb1324e0905cf1ec8ae2f5 |
--- /dev/null |
+++ b/content/child/service_worker/embedded_worker_stub.cc |
@@ -0,0 +1,36 @@ |
+// Copyright 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "content/child/service_worker/embedded_worker_stub.h" |
+ |
+#include "content/child/child_process.h" |
+#include "content/child/child_thread.h" |
+ |
+namespace content { |
+ |
+EmbeddedWorkerStub::EmbeddedWorkerStub( |
+ const GURL& script_url, |
+ int route_id) |
+ : script_url_(script_url), |
+ route_id_(route_id) { |
+ ChildThread::current()->AddRoute(route_id, this); |
michaeln
2013/11/04 22:04:51
The 'routed message' infrastructure is great for d
kinuko
2013/11/05 01:01:51
I expected having each worker's own routing might
|
+ ChildProcess::current()->AddRefProcess(); |
+ |
+ // TODO(kinuko): Initialize DevTools agent. |
+ NOTIMPLEMENTED(); |
+} |
+ |
+EmbeddedWorkerStub::~EmbeddedWorkerStub() { |
+ ChildThread::current()->RemoveRoute(route_id_); |
+ ChildProcess::current()->ReleaseProcess(); |
+} |
+ |
+bool EmbeddedWorkerStub::OnMessageReceived(const IPC::Message& message) { |
+ // TODO(kinuko): Add IPC messages for start, stop, load scripts etc. |
+ bool handled = true; |
+ NOTIMPLEMENTED(); |
+ return handled; |
+} |
+ |
+} // namespace content |