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.h" | 10 #include "base/process.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
173 // by listeners to register and unregister pending views to prevent the | 173 // by listeners to register and unregister pending views to prevent the |
174 // process from exiting. | 174 // process from exiting. |
175 virtual void AddPendingView() = 0; | 175 virtual void AddPendingView() = 0; |
176 virtual void RemovePendingView() = 0; | 176 virtual void RemovePendingView() = 0; |
177 | 177 |
178 // Sets a flag indicating that the process can be abnormally terminated. | 178 // Sets a flag indicating that the process can be abnormally terminated. |
179 virtual void SetSuddenTerminationAllowed(bool allowed) = 0; | 179 virtual void SetSuddenTerminationAllowed(bool allowed) = 0; |
180 // Returns true if the process can be abnormally terminated. | 180 // Returns true if the process can be abnormally terminated. |
181 virtual bool SuddenTerminationAllowed() const = 0; | 181 virtual bool SuddenTerminationAllowed() const = 0; |
182 | 182 |
183 // Returns true if the process can be killed if it is unresponsive. This will | |
184 // only be the case if there is only one view using this renderer process. | |
185 virtual bool TerminateOnUnresponsiveAllowed() const = 0; | |
jam
2012/03/02 00:21:10
i dont think this new method is necessary? can't t
nasko
2012/03/02 18:40:36
They probably could, but this means that they shou
Charlie Reis
2012/03/02 19:17:02
I agree with Nasko. It's not clear to users of th
jam
2012/03/06 17:25:26
There's a cost every time we add a method to a pub
nasko
2012/03/06 18:16:25
The reason I picked the function is that the only
| |
186 | |
183 // Returns how long the child has been idle. The definition of idle | 187 // Returns how long the child has been idle. The definition of idle |
184 // depends on when a derived class calls mark_child_process_activity_time(). | 188 // depends on when a derived class calls mark_child_process_activity_time(). |
185 // This is a rough indicator and its resolution should not be better than | 189 // This is a rough indicator and its resolution should not be better than |
186 // 10 milliseconds. | 190 // 10 milliseconds. |
187 virtual base::TimeDelta GetChildProcessIdleTime() const = 0; | 191 virtual base::TimeDelta GetChildProcessIdleTime() const = 0; |
188 | 192 |
189 // Static management functions ----------------------------------------------- | 193 // Static management functions ----------------------------------------------- |
190 | 194 |
191 // Flag to run the renderer in process. This is primarily | 195 // Flag to run the renderer in process. This is primarily |
192 // for debugging purposes. When running "in process", the | 196 // for debugging purposes. When running "in process", the |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
229 | 233 |
230 // Returns the current max number of renderer processes used by the content | 234 // Returns the current max number of renderer processes used by the content |
231 // module. | 235 // module. |
232 static size_t GetMaxRendererProcessCount(); | 236 static size_t GetMaxRendererProcessCount(); |
233 }; | 237 }; |
234 | 238 |
235 } // namespace content. | 239 } // namespace content. |
236 | 240 |
237 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 241 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
238 | 242 |
OLD | NEW |