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/ui/tab_contents/tab_contents.h" | 9 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 // views::View overrides: | 128 // views::View overrides: |
129 virtual void ViewHierarchyChanged(bool is_add, | 129 virtual void ViewHierarchyChanged(bool is_add, |
130 views::View* parent, | 130 views::View* parent, |
131 views::View* child) OVERRIDE; | 131 views::View* child) OVERRIDE; |
132 | 132 |
133 // Returns true if the frame is in the foreground. | 133 // Returns true if the frame is in the foreground. |
134 bool IsFrameActive(WebContents* contents); | 134 bool IsFrameActive(WebContents* contents); |
135 | 135 |
136 static HungRendererDialogView* g_instance_; | 136 static HungRendererDialogView* g_instance_; |
137 | 137 |
| 138 // Helper function to kill the renderer process identified by the handle |
| 139 // passed in. |
| 140 static void KillRendererProcess(base::ProcessHandle process_handle); |
| 141 |
138 private: | 142 private: |
139 // Initialize the controls in this dialog. | 143 // Initialize the controls in this dialog. |
140 void Init(); | 144 void Init(); |
141 void CreateKillButtonView(); | 145 void CreateKillButtonView(); |
142 | 146 |
143 // Returns the bounds the dialog should be displayed at to be meaningfully | 147 // Returns the bounds the dialog should be displayed at to be meaningfully |
144 // associated with the specified WebContents. | 148 // associated with the specified WebContents. |
145 gfx::Rect GetDisplayBounds(WebContents* contents); | 149 gfx::Rect GetDisplayBounds(WebContents* contents); |
146 | 150 |
147 static void InitClass(); | 151 static void InitClass(); |
(...skipping 14 matching lines...) Expand all Loading... |
162 // Whether or not we've created controls for ourself. | 166 // Whether or not we've created controls for ourself. |
163 bool initialized_; | 167 bool initialized_; |
164 | 168 |
165 // An amusing icon image. | 169 // An amusing icon image. |
166 static gfx::ImageSkia* frozen_icon_; | 170 static gfx::ImageSkia* frozen_icon_; |
167 | 171 |
168 DISALLOW_COPY_AND_ASSIGN(HungRendererDialogView); | 172 DISALLOW_COPY_AND_ASSIGN(HungRendererDialogView); |
169 }; | 173 }; |
170 | 174 |
171 #endif // CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_H_ | 175 #endif // CHROME_BROWSER_UI_VIEWS_HUNG_RENDERER_VIEW_H_ |
OLD | NEW |