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

Side by Side Diff: chrome/browser/ui/views/hung_renderer_view_win.h

Issue 10806079: Add support for invoking the Windows 8 metro style hung renderer dialog box. The dialog box (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698