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/task_manager/task_manager.h" | 5 #include "chrome/browser/task_manager/task_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/i18n/number_formatting.h" | 8 #include "base/i18n/number_formatting.h" |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/prefs/pref_registry_simple.h" | 10 #include "base/prefs/pref_registry_simple.h" |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 DCHECK(iter != group_map_.end()); | 735 DCHECK(iter != group_map_.end()); |
736 const ResourceList& group = iter->second; | 736 const ResourceList& group = iter->second; |
737 return (group.back() == resource); | 737 return (group.back() == resource); |
738 } | 738 } |
739 | 739 |
740 gfx::ImageSkia TaskManagerModel::GetResourceIcon(int index) const { | 740 gfx::ImageSkia TaskManagerModel::GetResourceIcon(int index) const { |
741 gfx::ImageSkia icon = GetResource(index)->GetIcon(); | 741 gfx::ImageSkia icon = GetResource(index)->GetIcon(); |
742 if (!icon.isNull()) | 742 if (!icon.isNull()) |
743 return icon; | 743 return icon; |
744 | 744 |
745 static gfx::ImageSkia* default_icon = ResourceBundle::GetSharedInstance(). | 745 static const gfx::ImageSkia* default_icon = |
746 GetImageSkiaNamed(IDR_DEFAULT_FAVICON); | 746 ResourceBundle::GetSharedInstance(). |
| 747 GetNativeImageNamed(IDR_DEFAULT_FAVICON).ToImageSkia(); |
747 return *default_icon; | 748 return *default_icon; |
748 } | 749 } |
749 | 750 |
750 TaskManagerModel::GroupRange | 751 TaskManagerModel::GroupRange |
751 TaskManagerModel::GetGroupRangeForResource(int index) const { | 752 TaskManagerModel::GetGroupRangeForResource(int index) const { |
752 Resource* resource = GetResource(index); | 753 Resource* resource = GetResource(index); |
753 GroupMap::const_iterator group_iter = | 754 GroupMap::const_iterator group_iter = |
754 group_map_.find(resource->GetProcess()); | 755 group_map_.find(resource->GetProcess()); |
755 DCHECK(group_iter != group_map_.end()); | 756 DCHECK(group_iter != group_map_.end()); |
756 const ResourceList& group = group_iter->second; | 757 const ResourceList& group = group_iter->second; |
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1552 params.host_desktop_type = desktop_type; | 1553 params.host_desktop_type = desktop_type; |
1553 chrome::Navigate(¶ms); | 1554 chrome::Navigate(¶ms); |
1554 } | 1555 } |
1555 | 1556 |
1556 TaskManager::TaskManager() | 1557 TaskManager::TaskManager() |
1557 : model_(new TaskManagerModel(this)) { | 1558 : model_(new TaskManagerModel(this)) { |
1558 } | 1559 } |
1559 | 1560 |
1560 TaskManager::~TaskManager() { | 1561 TaskManager::~TaskManager() { |
1561 } | 1562 } |
OLD | NEW |