| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // Activates the task with |task_id| by bringing its container to the front if | 60 // Activates the task with |task_id| by bringing its container to the front if |
| 61 // possible. | 61 // possible. |
| 62 virtual void ActivateTask(TaskId task_id) = 0; | 62 virtual void ActivateTask(TaskId task_id) = 0; |
| 63 | 63 |
| 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. Only implemented in Windows now. |
| 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 // Only implemented in Windows now. |
| 81 virtual base::TimeDelta GetCpuTime(TaskId task_id) const = 0; |
| 82 |
| 74 // Returns the current physical/private/shared memory usage of the task with | 83 // 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 | 84 // |task_id| in bytes. A value of -1 means no valid value is currently |
| 76 // available. | 85 // available. |
| 77 virtual int64_t GetPhysicalMemoryUsage(TaskId task_id) const = 0; | 86 virtual int64_t GetPhysicalMemoryUsage(TaskId task_id) const = 0; |
| 78 virtual int64_t GetPrivateMemoryUsage(TaskId task_id) const = 0; | 87 virtual int64_t GetPrivateMemoryUsage(TaskId task_id) const = 0; |
| 79 virtual int64_t GetSharedMemoryUsage(TaskId task_id) const = 0; | 88 virtual int64_t GetSharedMemoryUsage(TaskId task_id) const = 0; |
| 80 virtual int64_t GetSwappedMemoryUsage(TaskId task_id) const = 0; | 89 virtual int64_t GetSwappedMemoryUsage(TaskId task_id) const = 0; |
| 81 | 90 |
| 82 // Returns the GPU memory usage of the task with |task_id| in bytes. A value | 91 // 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. | 92 // of -1 means no valid value is currently available. |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 | 279 |
| 271 // The flags containing the enabled resources types calculations. | 280 // The flags containing the enabled resources types calculations. |
| 272 int64_t enabled_resources_flags_; | 281 int64_t enabled_resources_flags_; |
| 273 | 282 |
| 274 DISALLOW_COPY_AND_ASSIGN(TaskManagerInterface); | 283 DISALLOW_COPY_AND_ASSIGN(TaskManagerInterface); |
| 275 }; | 284 }; |
| 276 | 285 |
| 277 } // namespace task_manager | 286 } // namespace task_manager |
| 278 | 287 |
| 279 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_INTERFACE_H_ | 288 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_INTERFACE_H_ |
| OLD | NEW |