Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / views / hung_renderer_view_win.h
blob3920c4039302c04926ab61467401febfdcc01064
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_WIN_H_
6 #define CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_WIN_H_
8 #include "base/basictypes.h"
9 #include "content/public/browser/web_contents.h"
11 // This class provides functionality to display a Windows 8 metro style hung
12 // renderer dialog.
13 class HungRendererDialogMetro {
14 public:
15 // Creates or returns the global instance of the HungRendererDialogMetro
16 // class
17 static HungRendererDialogMetro* Create();
18 static HungRendererDialogMetro* GetInstance();
20 void Show(content::WebContents* contents);
21 void Hide(content::WebContents* contents);
23 private:
24 HungRendererDialogMetro();
25 ~HungRendererDialogMetro();
27 // Handlers for the hang monitor dialog displayed in Windows 8 metro.
28 static void OnMetroKillProcess();
29 static void OnMetroWait();
31 // Resets Windows 8 metro specific state like whether the dialog was
32 // displayed, etc.
33 void ResetMetroState();
35 content::WebContents* contents_;
37 // Set to true if the metro version of the hang dialog is displayed.
38 // Helps ensure that only one instance of the dialog is displayed at any
39 // given time.
40 bool metro_dialog_displayed_;
42 // Pointer to the global instance of the HungRendererDialogMetro class.
43 static HungRendererDialogMetro* g_instance_;
45 DISALLOW_COPY_AND_ASSIGN(HungRendererDialogMetro);
48 #endif // CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_WIN_H_