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

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

Issue 25008006: Flush out initial [un]registerServiceWorker roundtrip (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove render_process_id_ for now 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/web_service_worker_provider_impl.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/child/service_worker/service_worker_message_filter.h"
11 #include "content/child/thread_safe_sender.h"
12 #include "content/common/service_worker_messages.h"
13 #include "ipc/ipc_sender.h"
14 #include "third_party/WebKit/public/platform/WebString.h"
15 #include "third_party/WebKit/public/platform/WebURL.h"
16
17 using WebKit::WebString;
18 using WebKit::WebURL;
19
20 namespace content {
21
22 WebServiceWorkerProviderImpl::WebServiceWorkerProviderImpl(
23 ThreadSafeSender* thread_safe_sender,
24 ServiceWorkerMessageFilter* message_filter,
25 const WebKit::WebURL& origin,
26 scoped_ptr<WebKit::WebServiceWorkerProviderClient> client)
27 : thread_safe_sender_(thread_safe_sender), client_(client.Pass()) {}
28
29 WebServiceWorkerProviderImpl::~WebServiceWorkerProviderImpl() {}
30
31 void WebServiceWorkerProviderImpl::registerServiceWorker(
32 const WebURL& pattern,
33 const WebURL& script_url,
34 WebServiceWorkerCallbacks* callbacks) {
35 ServiceWorkerDispatcher::ThreadSpecificInstance(thread_safe_sender_)
36 ->RegisterServiceWorker(pattern, script_url, callbacks);
37 }
38
39 void WebServiceWorkerProviderImpl::unregisterServiceWorker(
40 const WebURL& pattern,
41 WebServiceWorkerCallbacks* callbacks) {
42 ServiceWorkerDispatcher::ThreadSpecificInstance(thread_safe_sender_)
43 ->UnregisterServiceWorker(pattern, callbacks);
44 }
45
46 } // namespace content
OLDNEW
« no previous file with comments | « content/child/service_worker/web_service_worker_provider_impl.h ('k') | content/common/service_worker_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698