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/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/i18n/number_formatting.h" | 9 #include "base/i18n/number_formatting.h" |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1061 if (iter == metrics_map_.end()) | 1061 if (iter == metrics_map_.end()) |
1062 return false; | 1062 return false; |
1063 *proc_metrics = iter->second; | 1063 *proc_metrics = iter->second; |
1064 return true; | 1064 return true; |
1065 } | 1065 } |
1066 | 1066 |
1067 //////////////////////////////////////////////////////////////////////////////// | 1067 //////////////////////////////////////////////////////////////////////////////// |
1068 // TaskManager class | 1068 // TaskManager class |
1069 //////////////////////////////////////////////////////////////////////////////// | 1069 //////////////////////////////////////////////////////////////////////////////// |
1070 | 1070 |
| 1071 int TaskManager::Resource::GetRoutingID() const { return 0; } |
| 1072 |
| 1073 bool TaskManager::Resource::ReportsCacheStats() const { return false; } |
| 1074 |
| 1075 WebKit::WebCache::ResourceTypeStats |
| 1076 TaskManager::Resource::GetWebCoreCacheStats() const { |
| 1077 return WebKit::WebCache::ResourceTypeStats(); |
| 1078 } |
| 1079 |
| 1080 bool TaskManager::Resource::ReportsFPS() const { return false; } |
| 1081 |
| 1082 float TaskManager::Resource::GetFPS() const { return 0.0f; } |
| 1083 |
| 1084 bool TaskManager::Resource::ReportsSqliteMemoryUsed() const { return false; } |
| 1085 |
| 1086 size_t TaskManager::Resource::SqliteMemoryUsedBytes() const { return 0; } |
| 1087 |
| 1088 const extensions::Extension* TaskManager::Resource::GetExtension() const { |
| 1089 return NULL; |
| 1090 } |
| 1091 |
| 1092 bool TaskManager::Resource::ReportsV8MemoryStats() const { return false; } |
| 1093 |
| 1094 size_t TaskManager::Resource::GetV8MemoryAllocated() const { return 0; } |
| 1095 |
| 1096 size_t TaskManager::Resource::GetV8MemoryUsed() const { return 0; } |
| 1097 |
| 1098 bool TaskManager::Resource::CanInspect() const { return false; } |
| 1099 |
| 1100 content::WebContents* TaskManager::Resource::GetWebContents() const { |
| 1101 return NULL; |
| 1102 } |
| 1103 |
| 1104 bool TaskManager::Resource::IsBackground() const { return false; } |
| 1105 |
1071 // static | 1106 // static |
1072 void TaskManager::RegisterPrefs(PrefService* prefs) { | 1107 void TaskManager::RegisterPrefs(PrefService* prefs) { |
1073 prefs->RegisterDictionaryPref(prefs::kTaskManagerWindowPlacement); | 1108 prefs->RegisterDictionaryPref(prefs::kTaskManagerWindowPlacement); |
1074 } | 1109 } |
1075 | 1110 |
1076 TaskManager::TaskManager() | 1111 TaskManager::TaskManager() |
1077 : ALLOW_THIS_IN_INITIALIZER_LIST(model_(new TaskManagerModel(this))) { | 1112 : ALLOW_THIS_IN_INITIALIZER_LIST(model_(new TaskManagerModel(this))) { |
1078 } | 1113 } |
1079 | 1114 |
1080 TaskManager::~TaskManager() { | 1115 TaskManager::~TaskManager() { |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1190 // Count the number of extensions with background pages (including | 1225 // Count the number of extensions with background pages (including |
1191 // incognito). | 1226 // incognito). |
1192 count += CountExtensionBackgroundPagesForProfile(profile); | 1227 count += CountExtensionBackgroundPagesForProfile(profile); |
1193 if (profile->HasOffTheRecordProfile()) { | 1228 if (profile->HasOffTheRecordProfile()) { |
1194 count += CountExtensionBackgroundPagesForProfile( | 1229 count += CountExtensionBackgroundPagesForProfile( |
1195 profile->GetOffTheRecordProfile()); | 1230 profile->GetOffTheRecordProfile()); |
1196 } | 1231 } |
1197 } | 1232 } |
1198 return count; | 1233 return count; |
1199 } | 1234 } |
OLD | NEW |