| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 virtual void WidgetRestored() = 0; | 205 virtual void WidgetRestored() = 0; |
| 206 virtual void WidgetHidden() = 0; | 206 virtual void WidgetHidden() = 0; |
| 207 virtual int VisibleWidgetCount() const = 0; | 207 virtual int VisibleWidgetCount() const = 0; |
| 208 | 208 |
| 209 // Try to shutdown the associated renderer process as fast as possible. | 209 // Try to shutdown the associated renderer process as fast as possible. |
| 210 // If this renderer has any RenderViews with unload handlers, then this | 210 // If this renderer has any RenderViews with unload handlers, then this |
| 211 // function does nothing. The current implementation uses TerminateProcess. | 211 // function does nothing. The current implementation uses TerminateProcess. |
| 212 // Returns True if it was able to do fast shutdown. | 212 // Returns True if it was able to do fast shutdown. |
| 213 virtual bool FastShutdownIfPossible() = 0; | 213 virtual bool FastShutdownIfPossible() = 0; |
| 214 | 214 |
| 215 // Dump the child process' handle table before shutting down. |
| 216 virtual void DumpHandles() = 0; |
| 217 |
| 215 // Returns the process object associated with the child process. In certain | 218 // Returns the process object associated with the child process. In certain |
| 216 // tests or single-process mode, this will actually represent the current | 219 // tests or single-process mode, this will actually represent the current |
| 217 // process. | 220 // process. |
| 218 // | 221 // |
| 219 // NOTE: this is not necessarily valid immediately after calling Init, as | 222 // NOTE: this is not necessarily valid immediately after calling Init, as |
| 220 // Init starts the process asynchronously. It's guaranteed to be valid after | 223 // Init starts the process asynchronously. It's guaranteed to be valid after |
| 221 // the first IPC arrives. | 224 // the first IPC arrives. |
| 222 virtual base::ProcessHandle GetHandle() = 0; | 225 virtual base::ProcessHandle GetHandle() = 0; |
| 223 | 226 |
| 224 // Transport DIB functions --------------------------------------------------- | 227 // Transport DIB functions --------------------------------------------------- |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 // Factory object for RenderProcessHosts. Using this factory allows tests to | 341 // Factory object for RenderProcessHosts. Using this factory allows tests to |
| 339 // swap out a different one to use a TestRenderProcessHost. | 342 // swap out a different one to use a TestRenderProcessHost. |
| 340 class RenderProcessHostFactory { | 343 class RenderProcessHostFactory { |
| 341 public: | 344 public: |
| 342 virtual ~RenderProcessHostFactory() {} | 345 virtual ~RenderProcessHostFactory() {} |
| 343 virtual RenderProcessHost* CreateRenderProcessHost( | 346 virtual RenderProcessHost* CreateRenderProcessHost( |
| 344 content::BrowserContext* browser_context) const = 0; | 347 content::BrowserContext* browser_context) const = 0; |
| 345 }; | 348 }; |
| 346 | 349 |
| 347 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ | 350 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ |
| OLD | NEW |