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/task_manager/task_manager.h" | 5 #include "chrome/browser/task_manager/task_manager.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.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/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 | 559 |
560 bool TaskManagerModel::GetV8Memory(int index, size_t* result) const { | 560 bool TaskManagerModel::GetV8Memory(int index, size_t* result) const { |
561 *result = 0; | 561 *result = 0; |
562 if (!resources_[index]->ReportsV8MemoryStats()) | 562 if (!resources_[index]->ReportsV8MemoryStats()) |
563 return false; | 563 return false; |
564 | 564 |
565 *result = resources_[index]->GetV8MemoryAllocated(); | 565 *result = resources_[index]->GetV8MemoryAllocated(); |
566 return true; | 566 return true; |
567 } | 567 } |
568 | 568 |
569 bool TaskManagerModel::CanActivate(int index) const { | |
570 CHECK_LT(index, ResourceCount()); | |
571 return GetResourceTabContents(index); | |
572 } | |
573 | |
574 bool TaskManagerModel::CanInspect(int index) const { | 569 bool TaskManagerModel::CanInspect(int index) const { |
575 CHECK_LT(index, ResourceCount()); | 570 CHECK_LT(index, ResourceCount()); |
576 return resources_[index]->CanInspect(); | 571 return resources_[index]->CanInspect(); |
577 } | 572 } |
578 | 573 |
579 void TaskManagerModel::Inspect(int index) const { | 574 void TaskManagerModel::Inspect(int index) const { |
580 CHECK_LT(index, ResourceCount()); | 575 CHECK_LT(index, ResourceCount()); |
581 resources_[index]->Inspect(); | 576 resources_[index]->Inspect(); |
582 } | 577 } |
583 | 578 |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 // Count the number of extensions with background pages (including | 1136 // Count the number of extensions with background pages (including |
1142 // incognito). | 1137 // incognito). |
1143 count += CountExtensionBackgroundPagesForProfile(profile); | 1138 count += CountExtensionBackgroundPagesForProfile(profile); |
1144 if (profile->HasOffTheRecordProfile()) { | 1139 if (profile->HasOffTheRecordProfile()) { |
1145 count += CountExtensionBackgroundPagesForProfile( | 1140 count += CountExtensionBackgroundPagesForProfile( |
1146 profile->GetOffTheRecordProfile()); | 1141 profile->GetOffTheRecordProfile()); |
1147 } | 1142 } |
1148 } | 1143 } |
1149 return count; | 1144 return count; |
1150 } | 1145 } |
OLD | NEW |