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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 public HungPagesTableModel::Delegate { | 98 public HungPagesTableModel::Delegate { |
99 public: | 99 public: |
100 // Factory function for creating an instance of the HungRendererDialogView | 100 // Factory function for creating an instance of the HungRendererDialogView |
101 // class. At any given point only one instance can be active. | 101 // class. At any given point only one instance can be active. |
102 static HungRendererDialogView* Create(gfx::NativeView context); | 102 static HungRendererDialogView* Create(gfx::NativeView context); |
103 | 103 |
104 // Returns a pointer to the singleton instance if any. | 104 // Returns a pointer to the singleton instance if any. |
105 static HungRendererDialogView* GetInstance(); | 105 static HungRendererDialogView* GetInstance(); |
106 | 106 |
107 // Platform specific function to kill the renderer process identified by the | 107 // Platform specific function to kill the renderer process identified by the |
108 // handle passed in. | 108 // render process host passed in. |
109 static void KillRendererProcess(base::ProcessHandle process_handle); | 109 static void KillRendererProcess(content::RenderProcessHost* rph); |
110 | 110 |
111 // Returns true if the frame is in the foreground. | 111 // Returns true if the frame is in the foreground. |
112 static bool IsFrameActive(content::WebContents* contents); | 112 static bool IsFrameActive(content::WebContents* contents); |
113 | 113 |
114 virtual void ShowForWebContents(content::WebContents* contents); | 114 virtual void ShowForWebContents(content::WebContents* contents); |
115 virtual void EndForWebContents(content::WebContents* contents); | 115 virtual void EndForWebContents(content::WebContents* contents); |
116 | 116 |
117 // views::DialogDelegateView overrides: | 117 // views::DialogDelegateView overrides: |
118 base::string16 GetWindowTitle() const override; | 118 base::string16 GetWindowTitle() const override; |
119 void WindowClosing() override; | 119 void WindowClosing() override; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 // Whether or not we've created controls for ourself. | 158 // Whether or not we've created controls for ourself. |
159 bool initialized_; | 159 bool initialized_; |
160 | 160 |
161 // An amusing icon image. | 161 // An amusing icon image. |
162 static gfx::ImageSkia* frozen_icon_; | 162 static gfx::ImageSkia* frozen_icon_; |
163 | 163 |
164 DISALLOW_COPY_AND_ASSIGN(HungRendererDialogView); | 164 DISALLOW_COPY_AND_ASSIGN(HungRendererDialogView); |
165 }; | 165 }; |
166 | 166 |
167 #endif // CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_H_ | 167 #endif // CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_H_ |
OLD | NEW |