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/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 | |
| OLD | NEW |