Chromium Code Reviews| 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_MANAGER_TASK_MANAGER_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_INTERFACE_H_ |
| 6 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_INTERFACE_H_ | 6 #define CHROME_BROWSER_TASK_MANAGER_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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 // Returns if the task is killable. | 64 // Returns if the task is killable. |
| 65 virtual bool IsTaskKillable(TaskId task_id) = 0; | 65 virtual bool IsTaskKillable(TaskId task_id) = 0; |
| 66 | 66 |
| 67 // Kills the task with |task_id|. | 67 // Kills the task with |task_id|. |
| 68 virtual void KillTask(TaskId task_id) = 0; | 68 virtual void KillTask(TaskId task_id) = 0; |
| 69 | 69 |
| 70 // returns the CPU usage in percent for the process on which the task with | 70 // returns the CPU usage in percent for the process on which the task with |
| 71 // |task_id| is running during the current refresh cycle. | 71 // |task_id| is running during the current refresh cycle. |
| 72 virtual double GetCpuUsage(TaskId task_id) const = 0; | 72 virtual double GetCpuUsage(TaskId task_id) const = 0; |
| 73 | 73 |
| 74 // returns the start time for the process on which the task | |
| 75 // with |task_id| is running. | |
| 76 virtual base::Time GetStartTime(TaskId task_id) const = 0; | |
| 77 | |
| 78 // returns the CPU time for the process on which the task | |
| 79 // with |task_id| is running during the current refresh cycle. | |
| 80 virtual base::TimeDelta GetCpuTime(TaskId task_id) const = 0; | |
|
afakhry
2016/12/21 18:34:34
Add a comment that these are only implemented for
chengx
2016/12/21 22:05:54
Done.
| |
| 81 | |
| 74 // Returns the current physical/private/shared memory usage of the task with | 82 // Returns the current physical/private/shared memory usage of the task with |
| 75 // |task_id| in bytes. A value of -1 means no valid value is currently | 83 // |task_id| in bytes. A value of -1 means no valid value is currently |
| 76 // available. | 84 // available. |
| 77 virtual int64_t GetPhysicalMemoryUsage(TaskId task_id) const = 0; | 85 virtual int64_t GetPhysicalMemoryUsage(TaskId task_id) const = 0; |
| 78 virtual int64_t GetPrivateMemoryUsage(TaskId task_id) const = 0; | 86 virtual int64_t GetPrivateMemoryUsage(TaskId task_id) const = 0; |
| 79 virtual int64_t GetSharedMemoryUsage(TaskId task_id) const = 0; | 87 virtual int64_t GetSharedMemoryUsage(TaskId task_id) const = 0; |
| 80 virtual int64_t GetSwappedMemoryUsage(TaskId task_id) const = 0; | 88 virtual int64_t GetSwappedMemoryUsage(TaskId task_id) const = 0; |
| 81 | 89 |
| 82 // Returns the GPU memory usage of the task with |task_id| in bytes. A value | 90 // Returns the GPU memory usage of the task with |task_id| in bytes. A value |
| 83 // of -1 means no valid value is currently available. | 91 // of -1 means no valid value is currently available. |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 270 | 278 |
| 271 // The flags containing the enabled resources types calculations. | 279 // The flags containing the enabled resources types calculations. |
| 272 int64_t enabled_resources_flags_; | 280 int64_t enabled_resources_flags_; |
| 273 | 281 |
| 274 DISALLOW_COPY_AND_ASSIGN(TaskManagerInterface); | 282 DISALLOW_COPY_AND_ASSIGN(TaskManagerInterface); |
| 275 }; | 283 }; |
| 276 | 284 |
| 277 } // namespace task_manager | 285 } // namespace task_manager |
| 278 | 286 |
| 279 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_INTERFACE_H_ | 287 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_INTERFACE_H_ |
| OLD | NEW |