OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/hung_renderer_dialog.h" | 5 #include "chrome/browser/hung_renderer_dialog.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 } | 90 } |
91 | 91 |
92 std::wstring HungPagesTableModel::GetText(int row, int column_id) { | 92 std::wstring HungPagesTableModel::GetText(int row, int column_id) { |
93 DCHECK(row >= 0 && row < RowCount()); | 93 DCHECK(row >= 0 && row < RowCount()); |
94 std::wstring title = UTF16ToWideHack(tab_contentses_[row]->GetTitle()); | 94 std::wstring title = UTF16ToWideHack(tab_contentses_[row]->GetTitle()); |
95 if (title.empty()) | 95 if (title.empty()) |
96 title = UTF16ToWideHack(TabContents::GetDefaultTitle()); | 96 title = UTF16ToWideHack(TabContents::GetDefaultTitle()); |
97 // TODO(xji): Consider adding a special case if the title text is a URL, | 97 // TODO(xji): Consider adding a special case if the title text is a URL, |
98 // since those should always have LTR directionality. Please refer to | 98 // since those should always have LTR directionality. Please refer to |
99 // http://crbug.com/6726 for more information. | 99 // http://crbug.com/6726 for more information. |
100 base::i18n::AdjustStringForLocaleDirection(title, &title); | 100 base::i18n::AdjustStringForLocaleDirection(&title); |
101 return title; | 101 return title; |
102 } | 102 } |
103 | 103 |
104 SkBitmap HungPagesTableModel::GetIcon(int row) { | 104 SkBitmap HungPagesTableModel::GetIcon(int row) { |
105 DCHECK(row >= 0 && row < RowCount()); | 105 DCHECK(row >= 0 && row < RowCount()); |
106 return tab_contentses_.at(row)->GetFavIcon(); | 106 return tab_contentses_.at(row)->GetFavIcon(); |
107 } | 107 } |
108 | 108 |
109 void HungPagesTableModel::SetObserver(TableModelObserver* observer) { | 109 void HungPagesTableModel::SetObserver(TableModelObserver* observer) { |
110 observer_ = observer; | 110 observer_ = observer; |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 } | 455 } |
456 | 456 |
457 // static | 457 // static |
458 void HideForTabContents(TabContents* contents) { | 458 void HideForTabContents(TabContents* contents) { |
459 if (!logging::DialogsAreSuppressed() && g_instance) | 459 if (!logging::DialogsAreSuppressed() && g_instance) |
460 g_instance->EndForTabContents(contents); | 460 g_instance->EndForTabContents(contents); |
461 } | 461 } |
462 | 462 |
463 } // namespace hung_renderer_dialog | 463 } // namespace hung_renderer_dialog |
464 | 464 |
OLD | NEW |