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

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

Issue 1186803002: ServiceWorker: Route unregister() through WebServiceWorkerRegistration for refactoring (4) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@route_web_sw_reg_2
Patch Set: rebase Created 5 years, 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/child/service_worker/web_service_worker_provider_impl.h" 5 #include "content/child/service_worker/web_service_worker_provider_impl.h"
6 6
7 #include "content/child/service_worker/service_worker_dispatcher.h" 7 #include "content/child/service_worker/service_worker_dispatcher.h"
8 #include "content/child/service_worker/service_worker_handle_reference.h" 8 #include "content/child/service_worker/service_worker_handle_reference.h"
9 #include "content/child/service_worker/service_worker_provider_context.h" 9 #include "content/child/service_worker/service_worker_provider_context.h"
10 #include "content/child/service_worker/web_service_worker_impl.h" 10 #include "content/child/service_worker/web_service_worker_impl.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 51
52 void WebServiceWorkerProviderImpl::registerServiceWorker( 52 void WebServiceWorkerProviderImpl::registerServiceWorker(
53 const WebURL& pattern, 53 const WebURL& pattern,
54 const WebURL& script_url, 54 const WebURL& script_url,
55 WebServiceWorkerRegistrationCallbacks* callbacks) { 55 WebServiceWorkerRegistrationCallbacks* callbacks) {
56 GetDispatcher()->RegisterServiceWorker( 56 GetDispatcher()->RegisterServiceWorker(
57 context_->provider_id(), pattern, script_url, callbacks); 57 context_->provider_id(), pattern, script_url, callbacks);
58 } 58 }
59 59
60 void WebServiceWorkerProviderImpl::unregisterServiceWorker(
61 const WebURL& pattern,
62 blink::WebCallbacks<bool, blink::WebServiceWorkerError>* callbacks) {
63 GetDispatcher()->DeprecatedUnregisterServiceWorker(context_->provider_id(),
64 pattern, callbacks);
65 }
66
67 void WebServiceWorkerProviderImpl::getRegistration( 60 void WebServiceWorkerProviderImpl::getRegistration(
68 const blink::WebURL& document_url, 61 const blink::WebURL& document_url,
69 WebServiceWorkerRegistrationCallbacks* callbacks) { 62 WebServiceWorkerRegistrationCallbacks* callbacks) {
70 GetDispatcher()->GetRegistration( 63 GetDispatcher()->GetRegistration(
71 context_->provider_id(), document_url, callbacks); 64 context_->provider_id(), document_url, callbacks);
72 } 65 }
73 66
74 void WebServiceWorkerProviderImpl::getRegistrations( 67 void WebServiceWorkerProviderImpl::getRegistrations(
75 WebServiceWorkerGetRegistrationsCallbacks* callbacks) { 68 WebServiceWorkerGetRegistrationsCallbacks* callbacks) {
76 GetDispatcher()->GetRegistrations( 69 GetDispatcher()->GetRegistrations(
(...skipping 17 matching lines...) Expand all
94 if (dispatcher) 87 if (dispatcher)
95 dispatcher->RemoveProviderClient(context_->provider_id()); 88 dispatcher->RemoveProviderClient(context_->provider_id());
96 } 89 }
97 90
98 ServiceWorkerDispatcher* WebServiceWorkerProviderImpl::GetDispatcher() { 91 ServiceWorkerDispatcher* WebServiceWorkerProviderImpl::GetDispatcher() {
99 return ServiceWorkerDispatcher::GetOrCreateThreadSpecificInstance( 92 return ServiceWorkerDispatcher::GetOrCreateThreadSpecificInstance(
100 thread_safe_sender_.get()); 93 thread_safe_sender_.get());
101 } 94 }
102 95
103 } // namespace content 96 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698