Index: content/browser/worker_host/worker_process_host.h |
diff --git a/content/browser/worker_host/worker_process_host.h b/content/browser/worker_host/worker_process_host.h |
index 76b0d5ab950643a0bb7ee856b24ad6e303110185..48449ec1ce06c38ad57860a928343c4087c925e9 100644 |
--- a/content/browser/worker_host/worker_process_host.h |
+++ b/content/browser/worker_host/worker_process_host.h |
@@ -6,6 +6,7 @@ |
#define CONTENT_BROWSER_WORKER_HOST_WORKER_PROCESS_HOST_H_ |
#include <list> |
+#include <string> |
#include <utility> |
#include "base/basictypes.h" |
@@ -19,12 +20,22 @@ |
#include "ipc/ipc_sender.h" |
class BrowserChildProcessHostImpl; |
+class ChromeAppCacheService; |
+class IndexedDBContextImpl; |
namespace content { |
class ResourceContext; |
class WorkerServiceImpl; |
} // namespace content |
+namespace fileapi { |
+class FileSystemContext; |
+} // namespace fileapi |
+ |
+namespace webkit_database { |
+class DatabaseTracker; |
+} // namespace webkit_database |
+ |
// The WorkerProcessHost is the interface that represents the browser side of |
// the browser <-> worker communication channel. There will be one |
// WorkerProcessHost per worker process. Currently each worker runs in its own |
@@ -43,12 +54,22 @@ class WorkerProcessHost : public content::BrowserChildProcessHostDelegate, |
int worker_route_id, |
int parent_process_id, |
int64 main_resource_appcache_id, |
- content::ResourceContext* resource_context); |
+ const std::string& partition_id, |
+ content::ResourceContext* resource_context, |
+ ChromeAppCacheService* appcache_service, |
+ fileapi::FileSystemContext* filesystem_context, |
+ webkit_database::DatabaseTracker* database_tracker, |
+ IndexedDBContextImpl* indexed_db_context); |
// Used for pending instances. Rest of the parameters are ignored. |
WorkerInstance(const GURL& url, |
bool shared, |
const string16& name, |
- content::ResourceContext* resource_context); |
+ const std::string& partition_id, |
+ content::ResourceContext* resource_context, |
+ ChromeAppCacheService* appcache_service, |
+ fileapi::FileSystemContext* filesystem_context, |
+ webkit_database::DatabaseTracker* database_tracker, |
+ IndexedDBContextImpl* indexed_db_context); |
~WorkerInstance(); |
// Unique identifier for a worker client. |
@@ -73,6 +94,7 @@ class WorkerProcessHost : public content::BrowserChildProcessHostDelegate, |
bool Matches( |
const GURL& url, |
const string16& name, |
+ const std::string& partition_id, |
content::ResourceContext* resource_context) const; |
// Shares the passed instance's WorkerDocumentSet with this instance. This |
@@ -98,6 +120,21 @@ class WorkerProcessHost : public content::BrowserChildProcessHostDelegate, |
content::ResourceContext* resource_context() const { |
return resource_context_; |
} |
+ const std::string& partition_id() const { |
+ return partition_id_; |
+ } |
+ ChromeAppCacheService* appcache_service() const { |
+ return appcache_service_; |
+ } |
+ fileapi::FileSystemContext* filesystem_context() const { |
+ return filesystem_context_; |
+ } |
+ webkit_database::DatabaseTracker* database_tracker() const { |
+ return database_tracker_; |
+ } |
+ IndexedDBContextImpl* indexed_db_context() const { |
+ return indexed_db_context_; |
+ } |
private: |
// Set of all filters (clients) associated with this worker. |
@@ -109,10 +146,20 @@ class WorkerProcessHost : public content::BrowserChildProcessHostDelegate, |
int64 main_resource_appcache_id_; |
FilterList filters_; |
scoped_refptr<WorkerDocumentSet> worker_document_set_; |
+ std::string partition_id_; |
content::ResourceContext* const resource_context_; |
+ ChromeAppCacheService* const appcache_service_; |
+ fileapi::FileSystemContext* const filesystem_context_; |
+ webkit_database::DatabaseTracker* const database_tracker_; |
+ IndexedDBContextImpl* const indexed_db_context_; |
}; |
- explicit WorkerProcessHost(content::ResourceContext* resource_context); |
+ WorkerProcessHost(const std::string& partition_id, |
+ content::ResourceContext* resource_context, |
+ ChromeAppCacheService* appcache_service, |
+ fileapi::FileSystemContext* filesystem_context, |
+ webkit_database::DatabaseTracker* database_tracker, |
+ IndexedDBContextImpl* indexed_db_context); |
virtual ~WorkerProcessHost(); |
// IPC::Sender implementation: |
@@ -194,7 +241,12 @@ class WorkerProcessHost : public content::BrowserChildProcessHostDelegate, |
Instances instances_; |
+ std::string partition_id_; |
content::ResourceContext* const resource_context_; |
+ ChromeAppCacheService* const appcache_service_; |
+ fileapi::FileSystemContext* const filesystem_context_; |
+ webkit_database::DatabaseTracker* const database_tracker_; |
+ IndexedDBContextImpl* const indexed_db_context_; |
// A reference to the filter associated with this worker process. We need to |
// keep this around since we'll use it when forward messages to the worker |