Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Side by Side Diff: content/public/browser/render_process_host.h

Issue 9514016: Fixing a problem, where a hung renderer process is not killed when navigating away (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporating Charlie's feedback. Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698