OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/push_messaging/push_provider.h" | 5 #include "content/child/push_messaging/push_provider.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/threading/thread_local.h" | 10 #include "base/threading/thread_local.h" |
11 #include "content/child/push_messaging/push_dispatcher.h" | 11 #include "content/child/push_messaging/push_dispatcher.h" |
12 #include "content/child/service_worker/web_service_worker_registration_impl.h" | 12 #include "content/child/service_worker/web_service_worker_registration_impl.h" |
13 #include "content/child/thread_safe_sender.h" | 13 #include "content/child/thread_safe_sender.h" |
14 #include "content/child/worker_task_runner.h" | 14 #include "content/child/worker_task_runner.h" |
15 #include "content/common/push_messaging_messages.h" | 15 #include "content/common/push_messaging_messages.h" |
16 #include "third_party/WebKit/public/platform/WebPushRegistration.h" | |
17 #include "third_party/WebKit/public/platform/WebString.h" | 16 #include "third_party/WebKit/public/platform/WebString.h" |
| 17 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushRegis
tration.h" |
18 | 18 |
19 namespace content { | 19 namespace content { |
20 namespace { | 20 namespace { |
21 | 21 |
22 int CurrentWorkerId() { | 22 int CurrentWorkerId() { |
23 return WorkerTaskRunner::Instance()->CurrentWorkerId(); | 23 return WorkerTaskRunner::Instance()->CurrentWorkerId(); |
24 } | 24 } |
25 | 25 |
26 // Returns the id of the given |service_worker_registration|, which | 26 // Returns the id of the given |service_worker_registration|, which |
27 // is only available on the implementation of the interface. | 27 // is only available on the implementation of the interface. |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 permission_status_callbacks_.Lookup(request_id); | 253 permission_status_callbacks_.Lookup(request_id); |
254 if (!callbacks) | 254 if (!callbacks) |
255 return; | 255 return; |
256 | 256 |
257 callbacks->onError(); | 257 callbacks->onError(); |
258 | 258 |
259 permission_status_callbacks_.Remove(request_id); | 259 permission_status_callbacks_.Remove(request_id); |
260 } | 260 } |
261 | 261 |
262 } // namespace content | 262 } // namespace content |
OLD | NEW |