| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_WORKER_HOST_WORKER_PROCESS_HOST_H_ | 5 #ifndef CHROME_BROWSER_WORKER_HOST_WORKER_PROCESS_HOST_H_ |
| 6 #define CHROME_BROWSER_WORKER_HOST_WORKER_PROCESS_HOST_H_ | 6 #define CHROME_BROWSER_WORKER_HOST_WORKER_PROCESS_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
| 13 #include "chrome/browser/browser_child_process_host.h" | 13 #include "chrome/browser/browser_child_process_host.h" |
| 14 #include "chrome/browser/net/chrome_url_request_context.h" | 14 #include "chrome/browser/net/chrome_url_request_context.h" |
| 15 #include "chrome/browser/worker_host/worker_document_set.h" | 15 #include "chrome/browser/worker_host/worker_document_set.h" |
| 16 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
| 17 | 17 |
| 18 class URLRequestContextGetter; | 18 class URLRequestContextGetter; |
| 19 | 19 |
| 20 // The WorkerProcessHost is the interface that represents the browser side of | 20 // The WorkerProcessHost is the interface that represents the browser side of |
| 21 // the browser <-> worker communication channel. There will be one | 21 // the browser <-> worker communication channel. There will be one |
| 22 // WorkerProcessHost per worker process. Currently each worker runs in its own | 22 // WorkerProcessHost per worker process. Currently each worker runs in its own |
| 23 // process, but that may change. However, we do assume [by storing a | 23 // process, but that may change. However, we do assume (by storing a |
| 24 // URLRequestContext] that a WorkerProcessHost serves a single Profile. | 24 // net::URLRequestContext) that a WorkerProcessHost serves a single Profile. |
| 25 class WorkerProcessHost : public BrowserChildProcessHost { | 25 class WorkerProcessHost : public BrowserChildProcessHost { |
| 26 public: | 26 public: |
| 27 | 27 |
| 28 // Contains information about each worker instance, needed to forward messages | 28 // Contains information about each worker instance, needed to forward messages |
| 29 // between the renderer and worker processes. | 29 // between the renderer and worker processes. |
| 30 class WorkerInstance { | 30 class WorkerInstance { |
| 31 public: | 31 public: |
| 32 WorkerInstance(const GURL& url, | 32 WorkerInstance(const GURL& url, |
| 33 bool shared, | 33 bool shared, |
| 34 bool off_the_record, | 34 bool off_the_record, |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 // A reference to the filter associated with this worker process. We need to | 179 // A reference to the filter associated with this worker process. We need to |
| 180 // keep this around since we'll use it when forward messages to the worker | 180 // keep this around since we'll use it when forward messages to the worker |
| 181 // process. | 181 // process. |
| 182 scoped_refptr<WorkerMessageFilter> worker_message_filter_; | 182 scoped_refptr<WorkerMessageFilter> worker_message_filter_; |
| 183 | 183 |
| 184 DISALLOW_COPY_AND_ASSIGN(WorkerProcessHost); | 184 DISALLOW_COPY_AND_ASSIGN(WorkerProcessHost); |
| 185 }; | 185 }; |
| 186 | 186 |
| 187 #endif // CHROME_BROWSER_WORKER_HOST_WORKER_PROCESS_HOST_H_ | 187 #endif // CHROME_BROWSER_WORKER_HOST_WORKER_PROCESS_HOST_H_ |
| OLD | NEW |