| 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_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
| 9 #include "chrome/browser/favicon/favicon_tab_helper.h" | 9 #include "chrome/browser/favicon/favicon_tab_helper.h" |
| 10 #include "content/public/browser/web_contents_observer.h" | 10 #include "content/public/browser/web_contents_observer.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 // This class displays a dialog which contains information about a hung | 99 // This class displays a dialog which contains information about a hung |
| 100 // renderer process. | 100 // renderer process. |
| 101 class HungRendererDialogView : public views::DialogDelegateView, | 101 class HungRendererDialogView : public views::DialogDelegateView, |
| 102 public views::ButtonListener, | 102 public views::ButtonListener, |
| 103 public HungPagesTableModel::Delegate { | 103 public HungPagesTableModel::Delegate { |
| 104 public: | 104 public: |
| 105 // Factory function for creating an instance of the HungRendererDialogView | 105 // Factory function for creating an instance of the HungRendererDialogView |
| 106 // class. At any given point only one instance can be active. | 106 // class. At any given point only one instance can be active. |
| 107 static HungRendererDialogView* Create(); | 107 static HungRendererDialogView* Create(gfx::NativeView context); |
| 108 | 108 |
| 109 // Returns a pointer to the singleton instance if any. | 109 // Returns a pointer to the singleton instance if any. |
| 110 static HungRendererDialogView* GetInstance(); | 110 static HungRendererDialogView* GetInstance(); |
| 111 | 111 |
| 112 // Platform specific function to kill the renderer process identified by the | 112 // Platform specific function to kill the renderer process identified by the |
| 113 // handle passed in. | 113 // handle passed in. |
| 114 static void KillRendererProcess(base::ProcessHandle process_handle); | 114 static void KillRendererProcess(base::ProcessHandle process_handle); |
| 115 | 115 |
| 116 // Returns true if the frame is in the foreground. | 116 // Returns true if the frame is in the foreground. |
| 117 static bool IsFrameActive(content::WebContents* contents); | 117 static bool IsFrameActive(content::WebContents* contents); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 // Whether or not we've created controls for ourself. | 167 // Whether or not we've created controls for ourself. |
| 168 bool initialized_; | 168 bool initialized_; |
| 169 | 169 |
| 170 // An amusing icon image. | 170 // An amusing icon image. |
| 171 static gfx::ImageSkia* frozen_icon_; | 171 static gfx::ImageSkia* frozen_icon_; |
| 172 | 172 |
| 173 DISALLOW_COPY_AND_ASSIGN(HungRendererDialogView); | 173 DISALLOW_COPY_AND_ASSIGN(HungRendererDialogView); |
| 174 }; | 174 }; |
| 175 | 175 |
| 176 #endif // CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_H_ | 176 #endif // CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_H_ |
| OLD | NEW |