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 CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_WIN_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_WIN_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_WIN_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_WIN_H_ |
7 | 7 |
8 #include "chrome/browser/ui/views/hung_renderer_view.h" | 8 #include "base/basictypes.h" |
| 9 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
| 10 #include "content/public/browser/web_contents.h" |
9 | 11 |
10 class HungRendererDialogViewWin : public HungRendererDialogView { | 12 // This class provides functionality to display a Windows 8 metro style hung |
| 13 // renderer dialog. |
| 14 class HungRendererDialogMetro { |
11 public: | 15 public: |
12 HungRendererDialogViewWin() {} | 16 HungRendererDialogMetro(); |
13 virtual ~HungRendererDialogViewWin() {} | 17 ~HungRendererDialogMetro(); |
14 | 18 |
15 // HungRendererDialogView overrides. | 19 void Show(content::WebContents* contents); |
16 virtual void ShowForWebContents(WebContents* contents) OVERRIDE; | 20 void Hide(content::WebContents* contents); |
17 virtual void EndForWebContents(WebContents* contents) OVERRIDE; | 21 |
| 22 private: |
| 23 // Handlers for the hang monitor dialog displayed in Windows 8 metro. |
| 24 static void OnMetroKillProcess(); |
| 25 static void OnMetroWait(); |
| 26 |
| 27 // Resets Windows 8 metro specific state like whether the dialog was |
| 28 // displayed, etc. |
| 29 void ResetMetroState(); |
| 30 |
| 31 content::WebContents* contents_; |
| 32 |
| 33 // Set to true if the metro version of the hang dialog is displayed. |
| 34 // Helps ensure that only one instance of the dialog is displayed at any |
| 35 // given time. |
| 36 bool metro_dialog_displayed_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(HungRendererDialogMetro); |
18 }; | 39 }; |
19 | 40 |
20 #endif // CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_WIN_H_ | 41 #endif // CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_WIN_H_ |
21 | 42 |
OLD | NEW |