OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |