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

Unified Diff: chrome/browser/ui/views/hung_renderer_view.cc

Issue 6735042: Move favicon from TabContents to TabContentsWrapper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/hung_renderer_view.cc
diff --git a/chrome/browser/ui/views/hung_renderer_view.cc b/chrome/browser/ui/views/hung_renderer_view.cc
index 742862f6284a27c0dd3f757c92c6d0da81ab29c1..1274a0fdb80433af92e7954b0fc7dce479263e5d 100644
--- a/chrome/browser/ui/views/hung_renderer_view.cc
+++ b/chrome/browser/ui/views/hung_renderer_view.cc
@@ -7,6 +7,7 @@
#include "base/i18n/rtl.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_list.h"
+#include "chrome/browser/favicon_tab_helper.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/logging_chrome.h"
@@ -55,7 +56,7 @@ class HungPagesTableModel : public views::GroupTableModel {
virtual void GetGroupRangeForItem(int item, views::GroupRange* range);
private:
- typedef std::vector<TabContents*> TabContentsVector;
+ typedef std::vector<TabContentsWrapper*> TabContentsVector;
TabContentsVector tab_contentses_;
ui::TableModelObserver* observer_;
@@ -77,7 +78,7 @@ void HungPagesTableModel::InitForTabContents(TabContents* hung_contents) {
for (TabContentsIterator it; !it.done(); ++it) {
if (it->tab_contents()->GetRenderProcessHost() ==
hung_contents->GetRenderProcessHost())
- tab_contentses_.push_back((*it)->tab_contents());
+ tab_contentses_.push_back(*it);
}
// The world is different.
if (observer_)
@@ -93,7 +94,7 @@ int HungPagesTableModel::RowCount() {
string16 HungPagesTableModel::GetText(int row, int column_id) {
DCHECK(row >= 0 && row < RowCount());
- string16 title = tab_contentses_[row]->GetTitle();
+ string16 title = tab_contentses_[row]->tab_contents()->GetTitle();
if (title.empty())
title = TabContentsWrapper::GetDefaultTitle();
// TODO(xji): Consider adding a special case if the title text is a URL,
@@ -105,7 +106,7 @@ string16 HungPagesTableModel::GetText(int row, int column_id) {
SkBitmap HungPagesTableModel::GetIcon(int row) {
DCHECK(row >= 0 && row < RowCount());
- return tab_contentses_.at(row)->GetFavicon();
+ return tab_contentses_.at(row)->favicon_tab_helper()->GetFavicon();
}
void HungPagesTableModel::SetObserver(ui::TableModelObserver* observer) {
« no previous file with comments | « chrome/browser/ui/views/create_application_shortcut_view.cc ('k') | chrome/browser/ui/views/location_bar/location_bar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698