Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "content/child/service_worker/embedded_worker_stub.h" | |
| 6 | |
| 7 #include "content/child/child_process.h" | |
| 8 #include "content/child/child_thread.h" | |
| 9 | |
| 10 namespace content { | |
| 11 | |
| 12 EmbeddedWorkerStub::EmbeddedWorkerStub( | |
| 13 const GURL& script_url, | |
| 14 int route_id) | |
| 15 : script_url_(script_url), | |
| 16 route_id_(route_id) { | |
| 17 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
| |
| 18 ChildProcess::current()->AddRefProcess(); | |
| 19 | |
| 20 // TODO(kinuko): Initialize DevTools agent. | |
| 21 NOTIMPLEMENTED(); | |
| 22 } | |
| 23 | |
| 24 EmbeddedWorkerStub::~EmbeddedWorkerStub() { | |
| 25 ChildThread::current()->RemoveRoute(route_id_); | |
| 26 ChildProcess::current()->ReleaseProcess(); | |
| 27 } | |
| 28 | |
| 29 bool EmbeddedWorkerStub::OnMessageReceived(const IPC::Message& message) { | |
| 30 // TODO(kinuko): Add IPC messages for start, stop, load scripts etc. | |
| 31 bool handled = true; | |
| 32 NOTIMPLEMENTED(); | |
| 33 return handled; | |
| 34 } | |
| 35 | |
| 36 } // namespace content | |
| OLD | NEW |