Chromium Code Reviews| 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 CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 155 // only if |count| matches the number of render widgets that this process | 155 // only if |count| matches the number of render widgets that this process |
| 156 // controls. | 156 // controls. |
| 157 bool FastShutdownForPageCount(size_t count); | 157 bool FastShutdownForPageCount(size_t count); |
| 158 | 158 |
| 159 bool fast_shutdown_started() { | 159 bool fast_shutdown_started() { |
| 160 return fast_shutdown_started_; | 160 return fast_shutdown_started_; |
| 161 } | 161 } |
| 162 | 162 |
| 163 // Virtual interface --------------------------------------------------------- | 163 // Virtual interface --------------------------------------------------------- |
| 164 | 164 |
| 165 // Old RenderProcessHosts can be reused. Call this before Init to reset the | |
| 166 // instance to the state it was before being used. Has no effect if called on | |
| 167 // a fresh RenderProcessHost. | |
| 168 virtual void PrepareForReuse() = 0; | |
|
Charlie Reis
2011/06/22 00:52:31
Since we always call this (even on the first use),
Matt Perry
2011/06/22 21:14:12
I renamed to EnableSendQueue to reflect what it ac
| |
| 169 | |
| 165 // Initialize the new renderer process, returning true on success. This must | 170 // Initialize the new renderer process, returning true on success. This must |
| 166 // be called once before the object can be used, but can be called after | 171 // be called once before the object can be used, but can be called after |
| 167 // that with no effect. Therefore, if the caller isn't sure about whether | 172 // that with no effect. Therefore, if the caller isn't sure about whether |
| 168 // the process has been created, it should just call Init(). | 173 // the process has been created, it should just call Init(). |
| 169 virtual bool Init(bool is_accessibility_enabled) = 0; | 174 virtual bool Init(bool is_accessibility_enabled) = 0; |
| 170 | 175 |
| 171 // Gets the next available routing id. | 176 // Gets the next available routing id. |
| 172 virtual int GetNextRoutingID() = 0; | 177 virtual int GetNextRoutingID() = 0; |
| 173 | 178 |
| 174 // Called on the UI thread to cancel any outstanding resource requests for | 179 // Called on the UI thread to cancel any outstanding resource requests for |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 321 // Factory object for RenderProcessHosts. Using this factory allows tests to | 326 // Factory object for RenderProcessHosts. Using this factory allows tests to |
| 322 // swap out a different one to use a TestRenderProcessHost. | 327 // swap out a different one to use a TestRenderProcessHost. |
| 323 class RenderProcessHostFactory { | 328 class RenderProcessHostFactory { |
| 324 public: | 329 public: |
| 325 virtual ~RenderProcessHostFactory() {} | 330 virtual ~RenderProcessHostFactory() {} |
| 326 virtual RenderProcessHost* CreateRenderProcessHost( | 331 virtual RenderProcessHost* CreateRenderProcessHost( |
| 327 Profile* profile) const = 0; | 332 Profile* profile) const = 0; |
| 328 }; | 333 }; |
| 329 | 334 |
| 330 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ | 335 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ |
| OLD | NEW |