OLD | NEW |
1 // Copyright (c) 2011 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_RENDERER_HOST_RENDER_PROCESS_HOST_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 // that share the same profile and type. | 260 // that share the same profile and type. |
261 // Returns NULL if no suitable renderer process is available, in which case | 261 // Returns NULL if no suitable renderer process is available, in which case |
262 // the caller is free to create a new renderer. | 262 // the caller is free to create a new renderer. |
263 static RenderProcessHost* GetExistingProcessHost(Profile* profile, Type type); | 263 static RenderProcessHost* GetExistingProcessHost(Profile* profile, Type type); |
264 | 264 |
265 // Overrides the default heuristic for limiting the max renderer process | 265 // Overrides the default heuristic for limiting the max renderer process |
266 // count. This is useful for unit testing process limit behaviors. | 266 // count. This is useful for unit testing process limit behaviors. |
267 // A value of zero means to use the default heuristic. | 267 // A value of zero means to use the default heuristic. |
268 static void SetMaxRendererProcessCount(size_t count); | 268 static void SetMaxRendererProcessCount(size_t count); |
269 | 269 |
| 270 // Configures whether GPU tracing is enabled for the render process. |
| 271 // Returns number of processes that were enabled or disabled. |
| 272 static int SetTraceEnabled(bool enabled); |
| 273 |
270 protected: | 274 protected: |
271 // A proxy for our IPC::Channel that lives on the IO thread (see | 275 // A proxy for our IPC::Channel that lives on the IO thread (see |
272 // browser_process.h) | 276 // browser_process.h) |
273 scoped_ptr<IPC::SyncChannel> channel_; | 277 scoped_ptr<IPC::SyncChannel> channel_; |
274 | 278 |
275 // The registered listeners. When this list is empty or all NULL, we should | 279 // The registered listeners. When this list is empty or all NULL, we should |
276 // delete ourselves | 280 // delete ourselves |
277 IDMap<IPC::Channel::Listener> listeners_; | 281 IDMap<IPC::Channel::Listener> listeners_; |
278 | 282 |
279 // The maximum page ID we've ever seen from the renderer process. | 283 // The maximum page ID we've ever seen from the renderer process. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 // Factory object for RenderProcessHosts. Using this factory allows tests to | 322 // Factory object for RenderProcessHosts. Using this factory allows tests to |
319 // swap out a different one to use a TestRenderProcessHost. | 323 // swap out a different one to use a TestRenderProcessHost. |
320 class RenderProcessHostFactory { | 324 class RenderProcessHostFactory { |
321 public: | 325 public: |
322 virtual ~RenderProcessHostFactory() {} | 326 virtual ~RenderProcessHostFactory() {} |
323 virtual RenderProcessHost* CreateRenderProcessHost( | 327 virtual RenderProcessHost* CreateRenderProcessHost( |
324 Profile* profile) const = 0; | 328 Profile* profile) const = 0; |
325 }; | 329 }; |
326 | 330 |
327 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ | 331 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ |
OLD | NEW |