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 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 bool is_shared; | 22 bool is_shared; |
23 string16 name; | 23 string16 name; |
24 int renderer_id; | 24 int renderer_id; |
25 int render_view_route_id; | 25 int render_view_route_id; |
26 int worker_route_id; | 26 int worker_route_id; |
27 IPC::Message::Sender* sender; | 27 IPC::Message::Sender* sender; |
28 int sender_id; | 28 int sender_id; |
29 int sender_route_id; | 29 int sender_route_id; |
30 }; | 30 }; |
31 | 31 |
32 WorkerProcessHost(ResourceDispatcherHost* resource_dispatcher_host_); | 32 explicit WorkerProcessHost(ResourceDispatcherHost* resource_dispatcher_host_); |
33 ~WorkerProcessHost(); | 33 ~WorkerProcessHost(); |
34 | 34 |
35 // Starts the process. Returns true iff it succeeded. | 35 // Starts the process. Returns true iff it succeeded. |
36 bool Init(); | 36 bool Init(); |
37 | 37 |
38 // Creates a worker object in the process. | 38 // Creates a worker object in the process. |
39 void CreateWorker(const WorkerInstance& instance); | 39 void CreateWorker(const WorkerInstance& instance); |
40 | 40 |
41 // Returns true iff the given message from a renderer process was forwarded to | 41 // Returns true iff the given message from a renderer process was forwarded to |
42 // the worker. | 42 // the worker. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 Instances instances_; | 86 Instances instances_; |
87 | 87 |
88 // A callback to create a routing id for the associated worker process. | 88 // A callback to create a routing id for the associated worker process. |
89 scoped_ptr<CallbackWithReturnValue<int>::Type> next_route_id_callback_; | 89 scoped_ptr<CallbackWithReturnValue<int>::Type> next_route_id_callback_; |
90 | 90 |
91 DISALLOW_COPY_AND_ASSIGN(WorkerProcessHost); | 91 DISALLOW_COPY_AND_ASSIGN(WorkerProcessHost); |
92 }; | 92 }; |
93 | 93 |
94 #endif // CHROME_BROWSER_WORKER_HOST_WORKER_PROCESS_HOST_H_ | 94 #endif // CHROME_BROWSER_WORKER_HOST_WORKER_PROCESS_HOST_H_ |
OLD | NEW |