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

Side by Side Diff: chrome/browser/ui/views/hung_renderer_view.cc

Issue 7015051: Re-land: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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 "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/favicon/favicon_tab_helper.h" 9 #include "chrome/browser/favicon/favicon_tab_helper.h"
10 #include "chrome/browser/ui/browser_list.h" 10 #include "chrome/browser/ui/browser_list.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 // one is showing. 256 // one is showing.
257 hung_pages_table_model_->InitForTabContents(contents); 257 hung_pages_table_model_->InitForTabContents(contents);
258 window()->Show(); 258 window()->Show();
259 } 259 }
260 } 260 }
261 261
262 void HungRendererDialogView::EndForTabContents(TabContents* contents) { 262 void HungRendererDialogView::EndForTabContents(TabContents* contents) {
263 DCHECK(contents); 263 DCHECK(contents);
264 if (contents_ && contents_->GetRenderProcessHost() == 264 if (contents_ && contents_->GetRenderProcessHost() ==
265 contents->GetRenderProcessHost()) { 265 contents->GetRenderProcessHost()) {
266 window()->CloseWindow(); 266 window()->Close();
267 // Since we're closing, we no longer need this TabContents. 267 // Since we're closing, we no longer need this TabContents.
268 contents_ = NULL; 268 contents_ = NULL;
269 } 269 }
270 } 270 }
271 271
272 /////////////////////////////////////////////////////////////////////////////// 272 ///////////////////////////////////////////////////////////////////////////////
273 // HungRendererDialogView, views::DialogDelegate implementation: 273 // HungRendererDialogView, views::DialogDelegate implementation:
274 274
275 std::wstring HungRendererDialogView::GetWindowTitle() const { 275 std::wstring HungRendererDialogView::GetWindowTitle() const {
276 return UTF16ToWide( 276 return UTF16ToWide(
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 g_instance->ShowForTabContents(contents); 458 g_instance->ShowForTabContents(contents);
459 } 459 }
460 } 460 }
461 461
462 void HideHungRendererDialog(TabContents* contents) { 462 void HideHungRendererDialog(TabContents* contents) {
463 if (!logging::DialogsAreSuppressed() && g_instance) 463 if (!logging::DialogsAreSuppressed() && g_instance)
464 g_instance->EndForTabContents(contents); 464 g_instance->EndForTabContents(contents);
465 } 465 }
466 466
467 } // namespace browser 467 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/html_dialog_view.cc ('k') | chrome/browser/ui/views/importer/import_progress_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698