OLD | NEW |
---|---|
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 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | |
9 | 10 |
10 #include "base/callback.h" | 11 #include "base/callback.h" |
11 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
12 #include "base/id_map.h" | 13 #include "base/id_map.h" |
13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "content/browser/service_worker/service_worker_info.h" | |
15 #include "content/browser/service_worker/service_worker_provider_host.h" | 17 #include "content/browser/service_worker/service_worker_provider_host.h" |
16 #include "content/browser/service_worker/service_worker_registration_status.h" | 18 #include "content/browser/service_worker/service_worker_registration_status.h" |
17 #include "content/browser/service_worker/service_worker_storage.h" | 19 #include "content/browser/service_worker/service_worker_storage.h" |
18 #include "content/common/content_export.h" | 20 #include "content/common/content_export.h" |
19 | 21 |
20 class GURL; | 22 class GURL; |
21 | 23 |
22 namespace base { | 24 namespace base { |
23 class FilePath; | 25 class FilePath; |
24 } | 26 } |
(...skipping 16 matching lines...) Expand all Loading... | |
41 // is the root of the containment hierarchy for service worker data | 43 // is the root of the containment hierarchy for service worker data |
42 // associated with a particular partition. | 44 // associated with a particular partition. |
43 class CONTENT_EXPORT ServiceWorkerContextCore | 45 class CONTENT_EXPORT ServiceWorkerContextCore |
44 : NON_EXPORTED_BASE( | 46 : NON_EXPORTED_BASE( |
45 public base::SupportsWeakPtr<ServiceWorkerContextCore>) { | 47 public base::SupportsWeakPtr<ServiceWorkerContextCore>) { |
46 public: | 48 public: |
47 typedef base::Callback<void(ServiceWorkerStatusCode status, | 49 typedef base::Callback<void(ServiceWorkerStatusCode status, |
48 int64 registration_id)> RegistrationCallback; | 50 int64 registration_id)> RegistrationCallback; |
49 typedef base::Callback< | 51 typedef base::Callback< |
50 void(ServiceWorkerStatusCode status)> UnregistrationCallback; | 52 void(ServiceWorkerStatusCode status)> UnregistrationCallback; |
53 typedef base::Callback<void( | |
54 const std::vector<ServiceWorkerRegistrationInfo>& info)> InfoCallback; | |
michaeln
2014/03/06 01:19:02
Is this used anywhere?
alecflett
2014/03/06 19:25:15
oops, levftovers. Done.
| |
51 | 55 |
52 // This is owned by the StoragePartition, which will supply it with | 56 // This is owned by the StoragePartition, which will supply it with |
53 // the local path on disk. Given an empty |user_data_directory|, | 57 // the local path on disk. Given an empty |user_data_directory|, |
54 // nothing will be stored on disk. | 58 // nothing will be stored on disk. |
55 ServiceWorkerContextCore(const base::FilePath& user_data_directory, | 59 ServiceWorkerContextCore(const base::FilePath& user_data_directory, |
56 quota::QuotaManagerProxy* quota_manager_proxy); | 60 quota::QuotaManagerProxy* quota_manager_proxy); |
57 ~ServiceWorkerContextCore(); | 61 ~ServiceWorkerContextCore(); |
58 | 62 |
59 ServiceWorkerStorage* storage() { return storage_.get(); } | 63 ServiceWorkerStorage* storage() { return storage_.get(); } |
60 | 64 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
103 scoped_ptr<ServiceWorkerStorage> storage_; | 107 scoped_ptr<ServiceWorkerStorage> storage_; |
104 scoped_refptr<EmbeddedWorkerRegistry> embedded_worker_registry_; | 108 scoped_refptr<EmbeddedWorkerRegistry> embedded_worker_registry_; |
105 scoped_ptr<ServiceWorkerJobCoordinator> job_coordinator_; | 109 scoped_ptr<ServiceWorkerJobCoordinator> job_coordinator_; |
106 | 110 |
107 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextCore); | 111 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextCore); |
108 }; | 112 }; |
109 | 113 |
110 } // namespace content | 114 } // namespace content |
111 | 115 |
112 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_H_ | 116 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_H_ |
OLD | NEW |