| 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/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/favicon/favicon_tab_helper.h" | 10 #include "chrome/browser/favicon/favicon_tab_helper.h" |
| 11 #include "chrome/browser/ui/browser_list.h" | 11 #include "chrome/browser/ui/browser_list.h" |
| 12 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" |
| 12 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 13 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 13 #include "chrome/common/chrome_constants.h" | 14 #include "chrome/common/chrome_constants.h" |
| 14 #include "chrome/common/logging_chrome.h" | 15 #include "chrome/common/logging_chrome.h" |
| 15 #include "content/browser/renderer_host/render_view_host.h" | 16 #include "content/browser/renderer_host/render_view_host.h" |
| 16 #include "content/browser/tab_contents/tab_contents.h" | 17 #include "content/browser/tab_contents/tab_contents.h" |
| 17 #include "content/public/browser/render_process_host.h" | 18 #include "content/public/browser/render_process_host.h" |
| 18 #include "content/public/common/result_codes.h" | 19 #include "content/public/common/result_codes.h" |
| 19 #include "grit/chromium_strings.h" | 20 #include "grit/chromium_strings.h" |
| 20 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
| 21 #include "grit/theme_resources.h" | 22 #include "grit/theme_resources.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 // HungPagesTableModel, views::GroupTableModel implementation: | 159 // HungPagesTableModel, views::GroupTableModel implementation: |
| 159 | 160 |
| 160 int HungPagesTableModel::RowCount() { | 161 int HungPagesTableModel::RowCount() { |
| 161 return static_cast<int>(tab_observers_.size()); | 162 return static_cast<int>(tab_observers_.size()); |
| 162 } | 163 } |
| 163 | 164 |
| 164 string16 HungPagesTableModel::GetText(int row, int column_id) { | 165 string16 HungPagesTableModel::GetText(int row, int column_id) { |
| 165 DCHECK(row >= 0 && row < RowCount()); | 166 DCHECK(row >= 0 && row < RowCount()); |
| 166 string16 title = tab_observers_[row]->tab_contents()->GetTitle(); | 167 string16 title = tab_observers_[row]->tab_contents()->GetTitle(); |
| 167 if (title.empty()) | 168 if (title.empty()) |
| 168 title = TabContentsWrapper::GetDefaultTitle(); | 169 title = CoreTabHelper::GetDefaultTitle(); |
| 169 // TODO(xji): Consider adding a special case if the title text is a URL, | 170 // TODO(xji): Consider adding a special case if the title text is a URL, |
| 170 // since those should always have LTR directionality. Please refer to | 171 // since those should always have LTR directionality. Please refer to |
| 171 // http://crbug.com/6726 for more information. | 172 // http://crbug.com/6726 for more information. |
| 172 base::i18n::AdjustStringForLocaleDirection(&title); | 173 base::i18n::AdjustStringForLocaleDirection(&title); |
| 173 return title; | 174 return title; |
| 174 } | 175 } |
| 175 | 176 |
| 176 SkBitmap HungPagesTableModel::GetIcon(int row) { | 177 SkBitmap HungPagesTableModel::GetIcon(int row) { |
| 177 DCHECK(row >= 0 && row < RowCount()); | 178 DCHECK(row >= 0 && row < RowCount()); |
| 178 return tab_observers_[row]->favicon_tab_helper()->GetFavicon(); | 179 return tab_observers_[row]->favicon_tab_helper()->GetFavicon(); |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 g_instance->ShowForTabContents(contents); | 560 g_instance->ShowForTabContents(contents); |
| 560 } | 561 } |
| 561 } | 562 } |
| 562 | 563 |
| 563 void HideNativeHungRendererDialog(TabContents* contents) { | 564 void HideNativeHungRendererDialog(TabContents* contents) { |
| 564 if (!logging::DialogsAreSuppressed() && g_instance) | 565 if (!logging::DialogsAreSuppressed() && g_instance) |
| 565 g_instance->EndForTabContents(contents); | 566 g_instance->EndForTabContents(contents); |
| 566 } | 567 } |
| 567 | 568 |
| 568 } // namespace browser | 569 } // namespace browser |
| OLD | NEW |