OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/id_map.h" | 9 #include "base/id_map.h" |
10 #include "base/process/kill.h" | 10 #include "base/process/kill.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 class RenderWidgetHost; | 23 class RenderWidgetHost; |
24 class StoragePartition; | 24 class StoragePartition; |
25 } | 25 } |
26 | 26 |
27 namespace base { | 27 namespace base { |
28 class TimeDelta; | 28 class TimeDelta; |
29 } | 29 } |
30 | 30 |
31 namespace content { | 31 namespace content { |
32 | 32 |
| 33 typedef base::Thread* (*RendererMainThreadFactoryFunction)( |
| 34 const std::string& id); |
| 35 |
33 // Interface that represents the browser side of the browser <-> renderer | 36 // Interface that represents the browser side of the browser <-> renderer |
34 // communication channel. There will generally be one RenderProcessHost per | 37 // communication channel. There will generally be one RenderProcessHost per |
35 // renderer process. | 38 // renderer process. |
36 class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, | 39 class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, |
37 public IPC::Listener { | 40 public IPC::Listener { |
38 public: | 41 public: |
39 typedef IDMap<RenderProcessHost>::iterator iterator; | 42 typedef IDMap<RenderProcessHost>::iterator iterator; |
40 | 43 |
41 // Details for RENDERER_PROCESS_CLOSED notifications. | 44 // Details for RENDERER_PROCESS_CLOSED notifications. |
42 struct RendererClosedDetails { | 45 struct RendererClosedDetails { |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 // Overrides the default heuristic for limiting the max renderer process | 244 // Overrides the default heuristic for limiting the max renderer process |
242 // count. This is useful for unit testing process limit behaviors. It is | 245 // count. This is useful for unit testing process limit behaviors. It is |
243 // also used to allow a command line parameter to configure the max number of | 246 // also used to allow a command line parameter to configure the max number of |
244 // renderer processes and should only be called once during startup. | 247 // renderer processes and should only be called once during startup. |
245 // A value of zero means to use the default heuristic. | 248 // A value of zero means to use the default heuristic. |
246 static void SetMaxRendererProcessCount(size_t count); | 249 static void SetMaxRendererProcessCount(size_t count); |
247 | 250 |
248 // Returns the current max number of renderer processes used by the content | 251 // Returns the current max number of renderer processes used by the content |
249 // module. | 252 // module. |
250 static size_t GetMaxRendererProcessCount(); | 253 static size_t GetMaxRendererProcessCount(); |
| 254 |
| 255 static void RegisterRendererMainThreadFactory( |
| 256 RendererMainThreadFactoryFunction create); |
251 }; | 257 }; |
252 | 258 |
253 } // namespace content. | 259 } // namespace content. |
254 | 260 |
255 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 261 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
OLD | NEW |