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

Side by Side Diff: chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc

Issue 7377010: This change will split the result codes between content and chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: actually rename the files Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/ui/browser_dialogs.h" 5 #include "chrome/browser/ui/browser_dialogs.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 // When the user clicks a button on the dialog or closes the dialog, this 188 // When the user clicks a button on the dialog or closes the dialog, this
189 // callback is called. 189 // callback is called.
190 void HungRendererDialogGtk::OnResponse(GtkWidget* dialog, int response_id) { 190 void HungRendererDialogGtk::OnResponse(GtkWidget* dialog, int response_id) {
191 DCHECK(g_instance == this); 191 DCHECK(g_instance == this);
192 switch (response_id) { 192 switch (response_id) {
193 case kKillPagesButtonResponse: 193 case kKillPagesButtonResponse:
194 // Kill the process. 194 // Kill the process.
195 if (contents_ && contents_->GetRenderProcessHost()) { 195 if (contents_ && contents_->GetRenderProcessHost()) {
196 base::KillProcess(contents_->GetRenderProcessHost()->GetHandle(), 196 base::KillProcess(contents_->GetRenderProcessHost()->GetHandle(),
197 ResultCodes::HUNG, false); 197 content::RESULT_CODE_HUNG, false);
198 } 198 }
199 break; 199 break;
200 200
201 case GTK_RESPONSE_OK: 201 case GTK_RESPONSE_OK:
202 case GTK_RESPONSE_DELETE_EVENT: 202 case GTK_RESPONSE_DELETE_EVENT:
203 // Start waiting again for responsiveness. 203 // Start waiting again for responsiveness.
204 if (contents_ && contents_->render_view_host()) 204 if (contents_ && contents_->render_view_host())
205 contents_->render_view_host()->RestartHangMonitorTimeout(); 205 contents_->render_view_host()->RestartHangMonitorTimeout();
206 break; 206 break;
207 default: 207 default:
(...skipping 16 matching lines...) Expand all
224 g_instance->ShowForTabContents(contents); 224 g_instance->ShowForTabContents(contents);
225 } 225 }
226 } 226 }
227 227
228 void HideHungRendererDialog(TabContents* contents) { 228 void HideHungRendererDialog(TabContents* contents) {
229 if (!logging::DialogsAreSuppressed() && g_instance) 229 if (!logging::DialogsAreSuppressed() && g_instance)
230 g_instance->EndForTabContents(contents); 230 g_instance->EndForTabContents(contents);
231 } 231 }
232 232
233 } // namespace browser 233 } // namespace browser
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698