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

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

Issue 25008006: Flush out initial [un]registerServiceWorker roundtrip (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 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/web_service_worker_registry_proxy.h"
6
7 #include "base/logging.h"
8 #include "content/child/child_thread.h"
9 #include "content/child/service_worker/service_worker_dispatcher.h"
10 #include "content/common/service_worker_messages.h"
11 #include "ipc/ipc_sender.h"
12 #include "third_party/WebKit/public/platform/WebString.h"
13 #include "third_party/WebKit/public/platform/WebURL.h"
14
15 using WebKit::WebString;
16 using WebKit::WebURL;
17
18 namespace content {
19
20 WebServiceWorkerRegistryImpl::~WebServiceWorkerRegistryImpl() {}
21
22 void WebServiceWorkerRegistryImpl::registerServiceWorker(
23 const WebString& pattern,
24 const WebURL& scriptUrl,
25 WebServiceWorkerCallbacks* callbacks) {
26 ChildThread::current()->service_worker_dispatcher()->RegisterServiceWorker(
27 pattern, scriptUrl, callbacks);
kinuko 2013/09/30 12:41:17 So we start with an assumption that we call this o
alecflett 2013/10/01 00:17:04 Well my intention was to support any main or worke
kinuko 2013/10/01 07:48:11 ChildThread::current() returns null on non-main th
28 }
29
30 void WebServiceWorkerRegistryImpl::unregisterServiceWorker(
31 const WebString& pattern,
32 WebServiceWorkerCallbacks* callbacks) {
33 ChildThread::current()->service_worker_dispatcher()->UnregisterServiceWorker(
34 pattern, callbacks);
35 }
36
37 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698