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

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

Issue 140743012: Start EmbeddedWorker during registration - take 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
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 "base/atomic_sequence_num.h" 7 #include "base/atomic_sequence_num.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "content/child/child_thread.h" 9 #include "content/child/child_thread.h"
10 #include "content/child/service_worker/service_worker_dispatcher.h" 10 #include "content/child/service_worker/service_worker_dispatcher.h"
(...skipping 28 matching lines...) Expand all
39 WebServiceWorkerProviderImpl::~WebServiceWorkerProviderImpl() { 39 WebServiceWorkerProviderImpl::~WebServiceWorkerProviderImpl() {
40 thread_safe_sender_->Send( 40 thread_safe_sender_->Send(
41 new ServiceWorkerHostMsg_ProviderDestroyed(provider_id_)); 41 new ServiceWorkerHostMsg_ProviderDestroyed(provider_id_));
42 } 42 }
43 43
44 void WebServiceWorkerProviderImpl::registerServiceWorker( 44 void WebServiceWorkerProviderImpl::registerServiceWorker(
45 const WebURL& pattern, 45 const WebURL& pattern,
46 const WebURL& script_url, 46 const WebURL& script_url,
47 WebServiceWorkerCallbacks* callbacks) { 47 WebServiceWorkerCallbacks* callbacks) {
48 ServiceWorkerDispatcher::ThreadSpecificInstance(thread_safe_sender_) 48 ServiceWorkerDispatcher::ThreadSpecificInstance(thread_safe_sender_)
49 ->RegisterServiceWorker(pattern, script_url, callbacks); 49 ->RegisterServiceWorker(pattern, script_url, provider_id_, callbacks);
50 } 50 }
51 51
52 void WebServiceWorkerProviderImpl::unregisterServiceWorker( 52 void WebServiceWorkerProviderImpl::unregisterServiceWorker(
53 const WebURL& pattern, 53 const WebURL& pattern,
54 WebServiceWorkerCallbacks* callbacks) { 54 WebServiceWorkerCallbacks* callbacks) {
55 ServiceWorkerDispatcher::ThreadSpecificInstance(thread_safe_sender_) 55 ServiceWorkerDispatcher::ThreadSpecificInstance(thread_safe_sender_)
56 ->UnregisterServiceWorker(pattern, callbacks); 56 ->UnregisterServiceWorker(pattern, provider_id_, callbacks);
57 } 57 }
58 58
59 } // namespace content 59 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698