| 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 #include "chrome/browser/ui/views/hung_renderer_view.h" | 5 #include "chrome/browser/ui/views/hung_renderer_view.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) && !defined(USE_AURA) | 7 #if defined(OS_WIN) && !defined(USE_AURA) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 title = CoreTabHelper::GetDefaultTitle(); | 113 title = CoreTabHelper::GetDefaultTitle(); |
| 114 // TODO(xji): Consider adding a special case if the title text is a URL, | 114 // TODO(xji): Consider adding a special case if the title text is a URL, |
| 115 // since those should always have LTR directionality. Please refer to | 115 // since those should always have LTR directionality. Please refer to |
| 116 // http://crbug.com/6726 for more information. | 116 // http://crbug.com/6726 for more information. |
| 117 base::i18n::AdjustStringForLocaleDirection(&title); | 117 base::i18n::AdjustStringForLocaleDirection(&title); |
| 118 return title; | 118 return title; |
| 119 } | 119 } |
| 120 | 120 |
| 121 gfx::ImageSkia HungPagesTableModel::GetIcon(int row) { | 121 gfx::ImageSkia HungPagesTableModel::GetIcon(int row) { |
| 122 DCHECK(row >= 0 && row < RowCount()); | 122 DCHECK(row >= 0 && row < RowCount()); |
| 123 return tab_observers_[row]->favicon_tab_helper()->GetFavicon().AsImageSkia(); | 123 return FaviconTabHelper::FromWebContents( |
| 124 tab_observers_[row]->web_contents())->GetFavicon().AsImageSkia(); |
| 124 } | 125 } |
| 125 | 126 |
| 126 void HungPagesTableModel::SetObserver(ui::TableModelObserver* observer) { | 127 void HungPagesTableModel::SetObserver(ui::TableModelObserver* observer) { |
| 127 observer_ = observer; | 128 observer_ = observer; |
| 128 } | 129 } |
| 129 | 130 |
| 130 void HungPagesTableModel::GetGroupRangeForItem(int item, | 131 void HungPagesTableModel::GetGroupRangeForItem(int item, |
| 131 views::GroupRange* range) { | 132 views::GroupRange* range) { |
| 132 DCHECK(range); | 133 DCHECK(range); |
| 133 range->start = 0; | 134 range->start = 0; |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 } | 470 } |
| 470 | 471 |
| 471 void HideHungRendererDialog(WebContents* contents) { | 472 void HideHungRendererDialog(WebContents* contents) { |
| 472 if (!logging::DialogsAreSuppressed() && | 473 if (!logging::DialogsAreSuppressed() && |
| 473 !PlatformHideCustomHungRendererDialog(contents) && | 474 !PlatformHideCustomHungRendererDialog(contents) && |
| 474 HungRendererDialogView::GetInstance()) | 475 HungRendererDialogView::GetInstance()) |
| 475 HungRendererDialogView::GetInstance()->EndForWebContents(contents); | 476 HungRendererDialogView::GetInstance()->EndForWebContents(contents); |
| 476 } | 477 } |
| 477 | 478 |
| 478 } // namespace chrome | 479 } // namespace chrome |
| OLD | NEW |