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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
101 // URLRequestContextGetter's creation is moved into StoragePartition. | 101 // URLRequestContextGetter's creation is moved into StoragePartition. |
102 // http://crbug.com/158595 | 102 // http://crbug.com/158595 |
103 virtual StoragePartition* GetStoragePartition() const = 0; | 103 virtual StoragePartition* GetStoragePartition() const = 0; |
104 | 104 |
105 // Try to shutdown the associated renderer process as fast as possible. | 105 // Try to shutdown the associated renderer process as fast as possible. |
106 // If this renderer has any RenderViews with unload handlers, then this | 106 // If this renderer has any RenderViews with unload handlers, then this |
107 // function does nothing. The current implementation uses TerminateProcess. | 107 // function does nothing. The current implementation uses TerminateProcess. |
108 // Returns True if it was able to do fast shutdown. | 108 // Returns True if it was able to do fast shutdown. |
109 virtual bool FastShutdownIfPossible() = 0; | 109 virtual bool FastShutdownIfPossible() = 0; |
110 | 110 |
111 // Try to shutdown the associated renderer process forcedly, giving it the | |
112 // specified exit code. If |wait| is true, wait for the process to be actually | |
113 // terminated before returning. | |
114 // Returns True if it was able to do fast shutdown. | |
Charlie Reis
2014/12/01 19:44:10
nit: Don't capitalize true. Also see comment belo
Jaekyun Seok (inactive)
2014/12/02 00:50:39
Done.
| |
115 virtual bool FastShutdown(int exit_code, bool wait) = 0; | |
Charlie Reis
2014/12/01 19:44:09
This doesn't really overlap with any of the FastSh
Jaekyun Seok (inactive)
2014/12/02 00:50:39
I modified FastShutdown to use ProcessDied, and so
| |
116 | |
111 // Returns true if fast shutdown was started for the renderer. | 117 // Returns true if fast shutdown was started for the renderer. |
112 virtual bool FastShutdownStarted() const = 0; | 118 virtual bool FastShutdownStarted() const = 0; |
113 | 119 |
114 // Dump the child process' handle table before shutting down. | 120 // Dump the child process' handle table before shutting down. |
115 virtual void DumpHandles() = 0; | 121 virtual void DumpHandles() = 0; |
116 | 122 |
117 // Returns the process object associated with the child process. In certain | 123 // Returns the process object associated with the child process. In certain |
118 // tests or single-process mode, this will actually represent the current | 124 // tests or single-process mode, this will actually represent the current |
119 // process. | 125 // process. |
120 // | 126 // |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
287 static void SetMaxRendererProcessCount(size_t count); | 293 static void SetMaxRendererProcessCount(size_t count); |
288 | 294 |
289 // Returns the current maximum number of renderer process hosts kept by the | 295 // Returns the current maximum number of renderer process hosts kept by the |
290 // content module. | 296 // content module. |
291 static size_t GetMaxRendererProcessCount(); | 297 static size_t GetMaxRendererProcessCount(); |
292 }; | 298 }; |
293 | 299 |
294 } // namespace content. | 300 } // namespace content. |
295 | 301 |
296 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 302 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
OLD | NEW |