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

Side by Side Diff: content/child/service_worker/embedded_worker_dispatcher.cc

Issue 54573002: Initial child-process side plumbing for starting an embedded ServiceWorker context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_dispatcher.h"
6
7 #include "content/child/service_worker/embedded_worker_stub.h"
8 #include "content/common/service_worker_messages.h"
9
10 namespace content {
11
12 EmbeddedWorkerDispatcher::EmbeddedWorkerDispatcher() {}
13 EmbeddedWorkerDispatcher::~EmbeddedWorkerDispatcher() {}
14
15 bool EmbeddedWorkerDispatcher::OnMessageReceived(
16 const IPC::Message& message) {
17 bool handled = true;
18 IPC_BEGIN_MESSAGE_MAP(EmbeddedWorkerDispatcher, message)
19 IPC_MESSAGE_HANDLER(ServiceWorkerMsg_CreateWorker, OnCreateWorker)
20 IPC_MESSAGE_UNHANDLED(handled = false)
21 IPC_END_MESSAGE_MAP()
22 return handled;
23 }
24
25 void EmbeddedWorkerDispatcher::OnCreateWorker(
26 const GURL& script_url,
27 int route_id) {
28 // The stub owns itself and manages its lifetime.
29 new EmbeddedWorkerStub(script_url, route_id);
michaeln 2013/11/04 22:04:51 Its odd to see something newed and the ptr value n
30 }
31
32 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698