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 using content::WebContents; |
sky
2012/07/24 21:26:05
no using in headers.
ananta
2012/07/24 21:36:17
Done.
| |
13 | |
14 // This class provides functionality to display a Windows 8 metro style hung | |
15 // renderer dialog. | |
16 class HungRendererDialogMetro { | |
11 public: | 17 public: |
12 HungRendererDialogViewWin() {} | 18 HungRendererDialogMetro(); |
13 virtual ~HungRendererDialogViewWin() {} | 19 virtual ~HungRendererDialogMetro(); |
sky
2012/07/24 21:26:05
no virtual.
ananta
2012/07/24 21:36:17
Done.
| |
14 | 20 |
15 // HungRendererDialogView overrides. | 21 virtual void Show(WebContents* contents); |
sky
2012/07/24 21:26:05
no virtual on these.
ananta
2012/07/24 21:36:17
Artifacts from the previous iteration :(. Removed.
| |
16 virtual void ShowForWebContents(WebContents* contents) OVERRIDE; | 22 virtual void Hide(WebContents* contents); |
17 virtual void EndForWebContents(WebContents* contents) OVERRIDE; | 23 |
24 private: | |
25 // Handlers for the hang monitor dialog displayed in Windows 8 metro. | |
26 static void OnMetroKillProcess(); | |
27 static void OnMetroWait(); | |
28 | |
29 // Resets Windows 8 metro specific state like whether the dialog was | |
30 // displayed, etc. | |
31 void ResetMetroState(); | |
32 | |
33 WebContents* contents_; | |
34 | |
35 // Set to true if the metro version of the hang dialog is displayed. | |
36 // Helps ensure that only one instance of the dialog is displayed at any | |
37 // given time. | |
38 bool metro_dialog_displayed_; | |
18 }; | 39 }; |
sky
2012/07/24 21:26:05
DISALLOW_...
ananta
2012/07/24 21:36:17
Done.
| |
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 |