diff options
author | yoshiki@chromium.org <yoshiki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-11 06:22:29 +0000 |
---|---|---|
committer | yoshiki@chromium.org <yoshiki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-11 06:22:29 +0000 |
commit | 9f5d3e18e6f45217fa9eb1961ab2ba0d52f81400 (patch) | |
tree | bc1ca20b851388c6783de20e359fca02f44eefe7 /chrome/browser/task_manager/task_manager.h | |
parent | c4dae7c0f0990e9720de1bd00386922ab1557791 (diff) | |
download | chromium_src-9f5d3e18e6f45217fa9eb1961ab2ba0d52f81400.zip chromium_src-9f5d3e18e6f45217fa9eb1961ab2ba0d52f81400.tar.gz chromium_src-9f5d3e18e6f45217fa9eb1961ab2ba0d52f81400.tar.bz2 |
WebUI TaskManager: bundle same-process tasks with one row
Task manager should bundle same-process tasks to make select
them easier.
As this CL, the same-process resources are grouped and WebUI task manager treats tasks not as resource-by-resource but as group-by-group. Converting between index of resource and index of group is in task_manager_handler.cc.
BUG=chromium-os:13885
TEST=manual on chromeos-chrome in Linux
Review URL: http://codereview.chromium.org/7329014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91994 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/task_manager/task_manager.h')
-rw-r--r-- | chrome/browser/task_manager/task_manager.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/chrome/browser/task_manager/task_manager.h b/chrome/browser/task_manager/task_manager.h index a8acbe8..e30ec58 100644 --- a/chrome/browser/task_manager/task_manager.h +++ b/chrome/browser/task_manager/task_manager.h @@ -230,6 +230,8 @@ class TaskManagerModel : public base::RefCountedThreadSafe<TaskManagerModel> { // Returns number of registered resources. int ResourceCount() const; + // Returns number of registered groups. + int GroupCount() const; // Methods to return raw resource information. int64 GetNetworkUsage(int index) const; @@ -273,9 +275,10 @@ class TaskManagerModel : public base::RefCountedThreadSafe<TaskManagerModel> { // See design doc at http://go/at-teleporter for more information. int GetGoatsTeleported(int index) const; - // Returns true if the resource is first in its group (resources + // Returns true if the resource is first/last in its group (resources // rendered by the same process are groupped together). bool IsResourceFirstInGroup(int index) const; + bool IsResourceLastInGroup(int index) const; // Returns true if the resource runs in the background (not visible to the // user, e.g. extension background pages and BackgroundContents). @@ -287,6 +290,13 @@ class TaskManagerModel : public base::RefCountedThreadSafe<TaskManagerModel> { // Returns a pair (start, length) of the group range of resource. std::pair<int, int> GetGroupRangeForResource(int index) const; + // Returns an index of groups to which the resource belongs. + int GetGroupIndexForResource(int index) const; + + // Returns an index of resource which belongs to the |group_index|th group + // and which is the |index_in_group|th resource in group. + int GetResourceIndexForGroup(int group_index, int index_in_group) const; + // Compares values in column |col_id| and rows |row1|, |row2|. // Returns -1 if value in |row1| is less than value in |row2|, // 0 if they are equal, and 1 otherwise. |