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

Side by Side Diff: chrome/browser/task_manager/task_manager.cc

Issue 8506003: WebUI TaskManager: Add "Activate page" feature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
569 bool TaskManagerModel::CanInspect(int index) const { 574 bool TaskManagerModel::CanInspect(int index) const {
570 CHECK_LT(index, ResourceCount()); 575 CHECK_LT(index, ResourceCount());
571 return resources_[index]->CanInspect(); 576 return resources_[index]->CanInspect();
572 } 577 }
573 578
574 void TaskManagerModel::Inspect(int index) const { 579 void TaskManagerModel::Inspect(int index) const {
575 CHECK_LT(index, ResourceCount()); 580 CHECK_LT(index, ResourceCount());
576 resources_[index]->Inspect(); 581 resources_[index]->Inspect();
577 } 582 }
578 583
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 // Count the number of extensions with background pages (including 1141 // Count the number of extensions with background pages (including
1137 // incognito). 1142 // incognito).
1138 count += CountExtensionBackgroundPagesForProfile(profile); 1143 count += CountExtensionBackgroundPagesForProfile(profile);
1139 if (profile->HasOffTheRecordProfile()) { 1144 if (profile->HasOffTheRecordProfile()) {
1140 count += CountExtensionBackgroundPagesForProfile( 1145 count += CountExtensionBackgroundPagesForProfile(
1141 profile->GetOffTheRecordProfile()); 1146 profile->GetOffTheRecordProfile());
1142 } 1147 }
1143 } 1148 }
1144 return count; 1149 return count;
1145 } 1150 }
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/task_manager.h ('k') | chrome/browser/ui/webui/task_manager_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698