| 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 327ca208fa137f04bbd83c7e3c8bafbd95b6bdeb..cdcefb9c4e0b96117b15a68cc49a7a9bd2433db5 100644
|
| --- a/content/browser/worker_host/worker_process_host.h
|
| +++ b/content/browser/worker_host/worker_process_host.h
|
| @@ -15,9 +15,13 @@
|
| #include "content/browser/worker_host/worker_document_set.h"
|
| #include "googleurl/src/gurl.h"
|
|
|
| +class ResourceDispatcherHost;
|
| +namespace content {
|
| +class ResourceContext;
|
| +} // namespace content
|
| namespace net {
|
| class URLRequestContextGetter;
|
| -}
|
| +} // namespace net
|
|
|
| // The WorkerProcessHost is the interface that represents the browser side of
|
| // the browser <-> worker communication channel. There will be one
|
| @@ -39,7 +43,13 @@ class WorkerProcessHost : public BrowserChildProcessHost {
|
| int parent_process_id,
|
| int parent_appcache_host_id,
|
| int64 main_resource_appcache_id,
|
| - net::URLRequestContextGetter* request_context);
|
| + net::URLRequestContextGetter* request_context_getter,
|
| + const content::ResourceContext& resource_context);
|
| + // Used for pending instances. Rest of the parameters are ignored.
|
| + WorkerInstance(const GURL& url,
|
| + bool shared,
|
| + bool incognito,
|
| + const string16& name);
|
| ~WorkerInstance();
|
|
|
| // Unique identifier for a worker client.
|
| @@ -87,8 +97,11 @@ class WorkerProcessHost : public BrowserChildProcessHost {
|
| WorkerDocumentSet* worker_document_set() const {
|
| return worker_document_set_;
|
| }
|
| - net::URLRequestContextGetter* request_context() const {
|
| - return request_context_;
|
| + net::URLRequestContextGetter* request_context_getter() const {
|
| + return request_context_getter_;
|
| + }
|
| + const content::ResourceContext& resource_context() const {
|
| + return *resource_context_;
|
| }
|
|
|
| private:
|
| @@ -102,14 +115,16 @@ class WorkerProcessHost : public BrowserChildProcessHost {
|
| int parent_process_id_;
|
| int parent_appcache_host_id_;
|
| int64 main_resource_appcache_id_;
|
| - scoped_refptr<net::URLRequestContextGetter> request_context_;
|
| + scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
|
| FilterList filters_;
|
| scoped_refptr<WorkerDocumentSet> worker_document_set_;
|
| + const content::ResourceContext* const resource_context_;
|
| };
|
|
|
| WorkerProcessHost(
|
| - ResourceDispatcherHost* resource_dispatcher_host,
|
| - net::URLRequestContextGetter* request_context);
|
| + net::URLRequestContextGetter* request_context_getter,
|
| + const content::ResourceContext* resource_context,
|
| + ResourceDispatcherHost* resource_dispatcher_host);
|
| ~WorkerProcessHost();
|
|
|
| // Starts the process. Returns true iff it succeeded.
|
| @@ -131,10 +146,6 @@ class WorkerProcessHost : public BrowserChildProcessHost {
|
| void DocumentDetached(WorkerMessageFilter* filter,
|
| unsigned long long document_id);
|
|
|
| - net::URLRequestContextGetter* request_context() const {
|
| - return request_context_;
|
| - }
|
| -
|
| protected:
|
| friend class WorkerService;
|
|
|
| @@ -176,13 +187,17 @@ class WorkerProcessHost : public BrowserChildProcessHost {
|
|
|
| Instances instances_;
|
|
|
| - scoped_refptr<net::URLRequestContextGetter> request_context_;
|
| + scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
|
| +
|
| + const content::ResourceContext* const resource_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
|
| // process.
|
| scoped_refptr<WorkerMessageFilter> worker_message_filter_;
|
|
|
| + ResourceDispatcherHost* const resource_dispatcher_host_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(WorkerProcessHost);
|
| };
|
|
|
|
|