| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_INTERFACE_H_ |
| 6 #define CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_INTERFACE_H_ | 6 #define CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_INTERFACE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 virtual bool GetV8Memory(TaskId task_id, | 179 virtual bool GetV8Memory(TaskId task_id, |
| 180 int64_t* allocated, | 180 int64_t* allocated, |
| 181 int64_t* used) const = 0; | 181 int64_t* used) const = 0; |
| 182 | 182 |
| 183 // Gets the Webkit resource cache stats for the task with |task_id|. | 183 // Gets the Webkit resource cache stats for the task with |task_id|. |
| 184 // A return value of false means that task does NOT report WebCache stats. | 184 // A return value of false means that task does NOT report WebCache stats. |
| 185 virtual bool GetWebCacheStats( | 185 virtual bool GetWebCacheStats( |
| 186 TaskId task_id, | 186 TaskId task_id, |
| 187 blink::WebCache::ResourceTypeStats* stats) const = 0; | 187 blink::WebCache::ResourceTypeStats* stats) const = 0; |
| 188 | 188 |
| 189 // Gets the list of task IDs currently tracked by the task manager. The list | 189 // Gets the list of task IDs currently tracked by the task manager. Tasks that |
| 190 // will be sorted such that the task representing the browser process is at | 190 // share the same process id will always be consecutive. The list will be |
| 191 // the top of the list and the rest of the IDs will be sorted by the process | 191 // sorted in a way that reflects the process tree: the browser process will be |
| 192 // IDs on which the tasks are running, then by the task IDs themselves. | 192 // first, followed by the gpu process if it exists. Related processes (e.g., a |
| 193 // subframe process and its parent) will be kept together if possible. Callers |
| 194 // can expect this ordering to be stable when a process is added or removed. |
| 193 virtual const TaskIdList& GetTaskIdsList() const = 0; | 195 virtual const TaskIdList& GetTaskIdsList() const = 0; |
| 194 | 196 |
| 195 // Gets the list of task IDs of the tasks that run on the same process as the | 197 // Gets the list of task IDs of the tasks that run on the same process as the |
| 196 // task with |task_id|. The returned list will at least include |task_id|. | 198 // task with |task_id|. The returned list will at least include |task_id|. |
| 197 virtual TaskIdList GetIdsOfTasksSharingSameProcess(TaskId task_id) const = 0; | 199 virtual TaskIdList GetIdsOfTasksSharingSameProcess(TaskId task_id) const = 0; |
| 198 | 200 |
| 199 // Gets the number of task-manager tasks running on the same process on which | 201 // Gets the number of task-manager tasks running on the same process on which |
| 200 // the Task with |task_id| is running. | 202 // the Task with |task_id| is running. |
| 201 virtual size_t GetNumberOfTasksOnSameProcess(TaskId task_id) const = 0; | 203 virtual size_t GetNumberOfTasksOnSameProcess(TaskId task_id) const = 0; |
| 202 | 204 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 262 |
| 261 // The flags containing the enabled resources types calculations. | 263 // The flags containing the enabled resources types calculations. |
| 262 int64_t enabled_resources_flags_; | 264 int64_t enabled_resources_flags_; |
| 263 | 265 |
| 264 DISALLOW_COPY_AND_ASSIGN(TaskManagerInterface); | 266 DISALLOW_COPY_AND_ASSIGN(TaskManagerInterface); |
| 265 }; | 267 }; |
| 266 | 268 |
| 267 } // namespace task_management | 269 } // namespace task_management |
| 268 | 270 |
| 269 #endif // CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_INTERFACE_H_ | 271 #endif // CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_INTERFACE_H_ |
| OLD | NEW |