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

Side by Side Diff: content/renderer/service_worker/service_worker_context_client.cc

Issue 2080083002: Revert of Deletes mojo::Callback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/renderer/service_worker/service_worker_context_client.h" 5 #include "content/renderer/service_worker/service_worker_context_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 struct ServiceWorkerContextClient::WorkerContextData { 165 struct ServiceWorkerContextClient::WorkerContextData {
166 using ClientsCallbacksMap = 166 using ClientsCallbacksMap =
167 IDMap<blink::WebServiceWorkerClientsCallbacks, IDMapOwnPointer>; 167 IDMap<blink::WebServiceWorkerClientsCallbacks, IDMapOwnPointer>;
168 using ClaimClientsCallbacksMap = 168 using ClaimClientsCallbacksMap =
169 IDMap<blink::WebServiceWorkerClientsClaimCallbacks, IDMapOwnPointer>; 169 IDMap<blink::WebServiceWorkerClientsClaimCallbacks, IDMapOwnPointer>;
170 using ClientCallbacksMap = 170 using ClientCallbacksMap =
171 IDMap<blink::WebServiceWorkerClientCallbacks, IDMapOwnPointer>; 171 IDMap<blink::WebServiceWorkerClientCallbacks, IDMapOwnPointer>;
172 using SkipWaitingCallbacksMap = 172 using SkipWaitingCallbacksMap =
173 IDMap<blink::WebServiceWorkerSkipWaitingCallbacks, IDMapOwnPointer>; 173 IDMap<blink::WebServiceWorkerSkipWaitingCallbacks, IDMapOwnPointer>;
174 using SyncEventCallbacksMap = 174 using SyncEventCallbacksMap =
175 IDMap<const base::Callback<void(blink::mojom::ServiceWorkerEventStatus)>, 175 IDMap<const mojo::Callback<void(blink::mojom::ServiceWorkerEventStatus)>,
176 IDMapOwnPointer>; 176 IDMapOwnPointer>;
177 177
178 explicit WorkerContextData(ServiceWorkerContextClient* owner) 178 explicit WorkerContextData(ServiceWorkerContextClient* owner)
179 : weak_factory(owner), proxy_weak_factory(owner->proxy_) {} 179 : weak_factory(owner), proxy_weak_factory(owner->proxy_) {}
180 180
181 ~WorkerContextData() { 181 ~WorkerContextData() {
182 DCHECK(thread_checker.CalledOnValidThread()); 182 DCHECK(thread_checker.CalledOnValidThread());
183 } 183 }
184 184
185 // Pending callbacks for GetClientDocuments(). 185 // Pending callbacks for GetClientDocuments().
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 } 1024 }
1025 1025
1026 base::WeakPtr<ServiceWorkerContextClient> 1026 base::WeakPtr<ServiceWorkerContextClient>
1027 ServiceWorkerContextClient::GetWeakPtr() { 1027 ServiceWorkerContextClient::GetWeakPtr() {
1028 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); 1028 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread());
1029 DCHECK(context_); 1029 DCHECK(context_);
1030 return context_->weak_factory.GetWeakPtr(); 1030 return context_->weak_factory.GetWeakPtr();
1031 } 1031 }
1032 1032
1033 } // namespace content 1033 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/service_worker/service_worker_context_client.h ('k') | device/battery/battery_monitor_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698