diff options
author | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-28 03:04:20 +0000 |
---|---|---|
committer | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-28 03:04:20 +0000 |
commit | 512f064a24fd3a1e6f3b58219bc86426c8f695c2 (patch) | |
tree | 5d2840a6b7b7c345a5a500fccca44ab256e93e76 /chrome | |
parent | 500445863ed3986e731bad70eb4f6e28b084f985 (diff) | |
download | chromium_src-512f064a24fd3a1e6f3b58219bc86426c8f695c2.zip chromium_src-512f064a24fd3a1e6f3b58219bc86426c8f695c2.tar.gz chromium_src-512f064a24fd3a1e6f3b58219bc86426c8f695c2.tar.bz2 |
Makes sure TaskManager doesn't return an empty icon. If we return an
empty icon we get an ugly black square in the table.
BUG=3784
TEST=Follow steps in bug, also make sure you don't see any problems
with icons in task manager.
Review URL: http://codereview.chromium.org/8208
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4055 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/task_manager.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/task_manager.cc b/chrome/browser/task_manager.cc index 69cd020..7ff6997 100644 --- a/chrome/browser/task_manager.cc +++ b/chrome/browser/task_manager.cc @@ -7,6 +7,7 @@ #include "base/process_util.h" #include "base/stats_table.h" #include "base/string_util.h" +#include "chrome/app/theme/theme_resources.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/render_process_host.h" @@ -16,6 +17,7 @@ #include "chrome/common/l10n_util.h" #include "chrome/common/pref_names.h" #include "chrome/common/pref_service.h" +#include "chrome/common/resource_bundle.h" #include "chrome/views/accelerator.h" #include "chrome/views/background.h" #include "chrome/views/link.h" @@ -212,7 +214,13 @@ int TaskManagerTableModel::GetStatsValue(TaskManager::Resource* resource, SkBitmap TaskManagerTableModel::GetIcon(int row) { DCHECK(row < RowCount()); - return resources_[row]->GetIcon(); + SkBitmap icon = resources_[row]->GetIcon(); + if (!icon.isNull()) + return icon; + + static SkBitmap* default_icon = ResourceBundle::GetSharedInstance(). + GetBitmapNamed(IDR_DEFAULT_FAVICON); + return *default_icon; } void TaskManagerTableModel::GetGroupRangeForItem(int item, |