Chromium Code Reviews| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 // other non-guest renderers in the same process if IsIsolatedGuest is false. | 95 // other non-guest renderers in the same process if IsIsolatedGuest is false. |
| 96 virtual bool IsIsolatedGuest() const = 0; | 96 virtual bool IsIsolatedGuest() const = 0; |
| 97 | 97 |
| 98 // Returns the storage partition associated with this process. | 98 // Returns the storage partition associated with this process. |
| 99 // | 99 // |
| 100 // TODO(nasko): Remove this function from the public API once | 100 // TODO(nasko): Remove this function from the public API once |
| 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 forcedly, giving it the | |
|
Charlie Reis
2014/12/02 17:13:37
nit: shut down
nit: drop "forcedly," instead say "
Jaekyun Seok (inactive)
2014/12/03 02:51:35
Done.
| |
| 106 // specified exit code. If |wait| is true, wait for the process to be actually | |
| 107 // terminated before returning. | |
| 108 // Returns true if it was able to shut down. | |
| 109 virtual bool Shutdown(int exit_code, bool wait) = 0; | |
| 110 | |
| 105 // Try to shutdown the associated renderer process as fast as possible. | 111 // Try to shutdown the associated renderer process as fast as possible. |
| 106 // If this renderer has any RenderViews with unload handlers, then this | 112 // If this renderer has any RenderViews with unload handlers, then this |
| 107 // function does nothing. The current implementation uses TerminateProcess. | 113 // function does nothing. The current implementation uses TerminateProcess. |
|
Charlie Reis
2014/12/02 17:13:37
Might as well drop the "current implementation" se
Jaekyun Seok (inactive)
2014/12/03 02:51:35
Done.
| |
| 108 // Returns True if it was able to do fast shutdown. | 114 // Returns true if it was able to do fast shutdown. |
| 109 virtual bool FastShutdownIfPossible() = 0; | 115 virtual bool FastShutdownIfPossible() = 0; |
| 110 | 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 |
| (...skipping 168 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 |