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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 // other non-guest renderers in the same process if IsIsolatedGuest is false. | 92 // other non-guest renderers in the same process if IsIsolatedGuest is false. |
93 virtual bool IsIsolatedGuest() const = 0; | 93 virtual bool IsIsolatedGuest() const = 0; |
94 | 94 |
95 // Returns the storage partition associated with this process. | 95 // Returns the storage partition associated with this process. |
96 // | 96 // |
97 // TODO(nasko): Remove this function from the public API once | 97 // TODO(nasko): Remove this function from the public API once |
98 // URLRequestContextGetter's creation is moved into StoragePartition. | 98 // URLRequestContextGetter's creation is moved into StoragePartition. |
99 // http://crbug.com/158595 | 99 // http://crbug.com/158595 |
100 virtual StoragePartition* GetStoragePartition() const = 0; | 100 virtual StoragePartition* GetStoragePartition() const = 0; |
101 | 101 |
102 // Try to shutdown the associated renderer process as fast as possible. | 102 // Try to shut down the associated renderer process without running unload |
| 103 // handlers, etc, giving it the specified exit code. If |wait| is true, wait |
| 104 // for the process to be actually terminated before returning. |
| 105 // Returns true if it was able to shut down. |
| 106 virtual bool Shutdown(int exit_code, bool wait) = 0; |
| 107 |
| 108 // Try to shut down the associated renderer process as fast as possible. |
103 // If this renderer has any RenderViews with unload handlers, then this | 109 // If this renderer has any RenderViews with unload handlers, then this |
104 // function does nothing. The current implementation uses TerminateProcess. | 110 // function does nothing. |
105 // Returns True if it was able to do fast shutdown. | 111 // Returns true if it was able to do fast shutdown. |
106 virtual bool FastShutdownIfPossible() = 0; | 112 virtual bool FastShutdownIfPossible() = 0; |
107 | 113 |
108 // Returns true if fast shutdown was started for the renderer. | 114 // Returns true if fast shutdown was started for the renderer. |
109 virtual bool FastShutdownStarted() const = 0; | 115 virtual bool FastShutdownStarted() const = 0; |
110 | 116 |
111 // Dump the child process' handle table before shutting down. | 117 // Dump the child process' handle table before shutting down. |
112 virtual void DumpHandles() = 0; | 118 virtual void DumpHandles() = 0; |
113 | 119 |
114 // Returns the process object associated with the child process. In certain | 120 // Returns the process object associated with the child process. In certain |
115 // tests or single-process mode, this will actually represent the current | 121 // tests or single-process mode, this will actually represent the current |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 static void SetMaxRendererProcessCount(size_t count); | 290 static void SetMaxRendererProcessCount(size_t count); |
285 | 291 |
286 // Returns the current maximum number of renderer process hosts kept by the | 292 // Returns the current maximum number of renderer process hosts kept by the |
287 // content module. | 293 // content module. |
288 static size_t GetMaxRendererProcessCount(); | 294 static size_t GetMaxRendererProcessCount(); |
289 }; | 295 }; |
290 | 296 |
291 } // namespace content. | 297 } // namespace content. |
292 | 298 |
293 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 299 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
OLD | NEW |