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

Unified Diff: chrome/browser/ui/webui/hung_renderer_dialog.h

Issue 8372042: Tests for WebUI Hung Renderer Dialog (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed reversion issue Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/hung_renderer_dialog.js ('k') | chrome/browser/ui/webui/hung_renderer_dialog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/hung_renderer_dialog.h
diff --git a/chrome/browser/ui/webui/hung_renderer_dialog.h b/chrome/browser/ui/webui/hung_renderer_dialog.h
index e26a8a13a4a92d438076b05fd3ac9b31c4f8cc3d..c5e52cf8f4fe3db31295be873bccdaae1f2612ef 100644
--- a/chrome/browser/ui/webui/hung_renderer_dialog.h
+++ b/chrome/browser/ui/webui/hung_renderer_dialog.h
@@ -20,13 +20,13 @@ class HungRendererDialogHandler;
class HungRendererDialog : private HtmlDialogUIDelegate {
public:
// Shows a hung renderer dialog.
- static void ShowHungRendererDialog(TabContents* contents);
+ static void ShowHungRendererDialog(TabContents* contents, bool is_enabled);
// Hides a hung renderer dialog.
static void HideHungRendererDialog(TabContents* contents);
private:
- HungRendererDialog();
+ explicit HungRendererDialog(bool is_enabled);
// Shows the hung renderer dialog.
void ShowDialog(TabContents* contents);
@@ -53,6 +53,12 @@ class HungRendererDialog : private HtmlDialogUIDelegate {
// The dialog handler.
HungRendererDialogHandler* handler_;
+ // A safety switch that must be enabled to allow actual killing of processes
+ // or restarting of the hang timer. This is necessary so that tests can
+ // create a disabled version of this dialog that won't kill processes or
+ // restart timers when the dialog closes at the end of the test.
+ bool is_enabled_;
+
// The dialog window.
gfx::NativeWindow window_;
« no previous file with comments | « chrome/browser/resources/hung_renderer_dialog.js ('k') | chrome/browser/ui/webui/hung_renderer_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698