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