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 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_UNREGISTER_JOB_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_UNREGISTER_JOB_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_UNREGISTER_JOB_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_UNREGISTER_JOB_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "content/browser/service_worker/service_worker_register_job_base.h" | 14 #include "content/browser/service_worker/service_worker_register_job_base.h" |
15 #include "content/common/service_worker/service_worker_status_code.h" | 15 #include "content/common/service_worker/service_worker_status_code.h" |
16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 | 19 |
20 class EmbeddedWorkerRegistry; | |
21 class ServiceWorkerContextCore; | 20 class ServiceWorkerContextCore; |
22 class ServiceWorkerJobCoordinator; | |
23 class ServiceWorkerRegistration; | 21 class ServiceWorkerRegistration; |
24 class ServiceWorkerStorage; | |
25 | 22 |
26 // Handles the unregistration of a Service Worker. | 23 // Handles the unregistration of a Service Worker. |
27 // | 24 // |
28 // The unregistration process is primarily cleanup, removing everything that was | 25 // The unregistration process is primarily cleanup, removing everything that was |
29 // created during the registration process, including the | 26 // created during the registration process, including the |
30 // ServiceWorkerRegistration itself. | 27 // ServiceWorkerRegistration itself. |
31 class ServiceWorkerUnregisterJob : public ServiceWorkerRegisterJobBase { | 28 class ServiceWorkerUnregisterJob : public ServiceWorkerRegisterJobBase { |
32 public: | 29 public: |
33 typedef base::Callback<void(int64_t registration_id, | 30 typedef base::Callback<void(int64_t registration_id, |
34 ServiceWorkerStatusCode status)> | 31 ServiceWorkerStatusCode status)> |
(...skipping 26 matching lines...) Expand all Loading... |
61 const GURL pattern_; | 58 const GURL pattern_; |
62 std::vector<UnregistrationCallback> callbacks_; | 59 std::vector<UnregistrationCallback> callbacks_; |
63 bool is_promise_resolved_; | 60 bool is_promise_resolved_; |
64 base::WeakPtrFactory<ServiceWorkerUnregisterJob> weak_factory_; | 61 base::WeakPtrFactory<ServiceWorkerUnregisterJob> weak_factory_; |
65 | 62 |
66 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerUnregisterJob); | 63 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerUnregisterJob); |
67 }; | 64 }; |
68 } // namespace content | 65 } // namespace content |
69 | 66 |
70 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_UNREGISTER_JOB_H_ | 67 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_UNREGISTER_JOB_H_ |
OLD | NEW |