| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/file_path.h" | 14 #include "base/file_path.h" |
| 15 #include "base/ref_counted.h" | 15 #include "base/ref_counted.h" |
| 16 #include "chrome/browser/browser_child_process_host.h" | 16 #include "chrome/browser/browser_child_process_host.h" |
| 17 #include "chrome/browser/browser_message_filter.h" | 17 #include "chrome/browser/browser_message_filter.h" |
| 18 #include "chrome/browser/net/chrome_url_request_context.h" | 18 #include "chrome/browser/net/chrome_url_request_context.h" |
| 19 #include "chrome/browser/worker_host/worker_document_set.h" | 19 #include "chrome/browser/worker_host/worker_document_set.h" |
| 20 #include "googleurl/src/gurl.h" | 20 #include "googleurl/src/gurl.h" |
| 21 #include "ipc/ipc_channel.h" | 21 #include "ipc/ipc_channel.h" |
| 22 | 22 |
| 23 class BlobDispatcherHost; | |
| 24 class ChromeURLRequestContext; | 23 class ChromeURLRequestContext; |
| 25 class ChromeURLRequestContextGetter; | 24 class ChromeURLRequestContextGetter; |
| 26 class DatabaseDispatcherHost; | 25 class DatabaseDispatcherHost; |
| 27 class FileSystemDispatcherHost; | |
| 28 class FileUtilitiesDispatcherHost; | |
| 29 class MimeRegistryDispatcher; | |
| 30 namespace webkit_database { | 26 namespace webkit_database { |
| 31 class DatabaseTracker; | 27 class DatabaseTracker; |
| 32 } // namespace webkit_database | 28 } // namespace webkit_database |
| 33 | 29 |
| 34 struct ViewHostMsg_CreateWorker_Params; | 30 struct ViewHostMsg_CreateWorker_Params; |
| 35 | 31 |
| 36 // The WorkerProcessHost is the interface that represents the browser side of | 32 // The WorkerProcessHost is the interface that represents the browser side of |
| 37 // the browser <-> worker communication channel. There will be one | 33 // the browser <-> worker communication channel. There will be one |
| 38 // WorkerProcessHost per worker process. Currently each worker runs in its own | 34 // WorkerProcessHost per worker process. Currently each worker runs in its own |
| 39 // process, but that may change. However, we do assume [by storing a | 35 // process, but that may change. However, we do assume [by storing a |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 void OnAllowDatabase(const GURL& url, | 204 void OnAllowDatabase(const GURL& url, |
| 209 const string16& name, | 205 const string16& name, |
| 210 const string16& display_name, | 206 const string16& display_name, |
| 211 unsigned long estimated_size, | 207 unsigned long estimated_size, |
| 212 IPC::Message* reply_msg); | 208 IPC::Message* reply_msg); |
| 213 | 209 |
| 214 Instances instances_; | 210 Instances instances_; |
| 215 | 211 |
| 216 scoped_refptr<ChromeURLRequestContext> request_context_; | 212 scoped_refptr<ChromeURLRequestContext> request_context_; |
| 217 scoped_refptr<DatabaseDispatcherHost> db_dispatcher_host_; | 213 scoped_refptr<DatabaseDispatcherHost> db_dispatcher_host_; |
| 218 scoped_ptr<BlobDispatcherHost> blob_dispatcher_host_; | |
| 219 scoped_refptr<FileSystemDispatcherHost> file_system_dispatcher_host_; | |
| 220 scoped_refptr<FileUtilitiesDispatcherHost> file_utilities_dispatcher_host_; | |
| 221 scoped_refptr<MimeRegistryDispatcher> mime_registry_dispatcher_; | |
| 222 | 214 |
| 223 // Holds all the IPC message filters. Since the worker process host is on the | 215 // Holds all the IPC message filters. Since the worker process host is on the |
| 224 // IO thread, we don't have a IPC::ChannelProxy and so we manage filters | 216 // IO thread, we don't have a IPC::ChannelProxy and so we manage filters |
| 225 // manually. | 217 // manually. |
| 226 std::vector<scoped_refptr<BrowserMessageFilter> > filters_; | 218 std::vector<scoped_refptr<BrowserMessageFilter> > filters_; |
| 227 | 219 |
| 228 // A callback to create a routing id for the associated worker process. | 220 // A callback to create a routing id for the associated worker process. |
| 229 scoped_ptr<CallbackWithReturnValue<int>::Type> next_route_id_callback_; | 221 scoped_ptr<CallbackWithReturnValue<int>::Type> next_route_id_callback_; |
| 230 | 222 |
| 231 DISALLOW_COPY_AND_ASSIGN(WorkerProcessHost); | 223 DISALLOW_COPY_AND_ASSIGN(WorkerProcessHost); |
| 232 }; | 224 }; |
| 233 | 225 |
| 234 #endif // CHROME_BROWSER_WORKER_HOST_WORKER_PROCESS_HOST_H_ | 226 #endif // CHROME_BROWSER_WORKER_HOST_WORKER_PROCESS_HOST_H_ |
| OLD | NEW |