| 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 |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <utility> | 12 #include <utility> |
| 13 | 13 |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/memory_coordinator_client.h" |
| 15 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
| 16 #include "base/process/kill.h" | 17 #include "base/process/kill.h" |
| 17 #include "base/process/process_handle.h" | 18 #include "base/process/process_handle.h" |
| 18 #include "base/time/time.h" | 19 #include "base/time/time.h" |
| 19 #include "base/timer/timer.h" | 20 #include "base/timer/timer.h" |
| 20 #include "chrome/browser/task_manager/providers/task.h" | 21 #include "chrome/browser/task_manager/providers/task.h" |
| 21 #include "chrome/browser/task_manager/task_manager_observer.h" | 22 #include "chrome/browser/task_manager/task_manager_observer.h" |
| 22 #include "third_party/WebKit/public/web/WebCache.h" | 23 #include "third_party/WebKit/public/web/WebCache.h" |
| 23 #include "ui/gfx/image/image_skia.h" | 24 #include "ui/gfx/image/image_skia.h" |
| 24 | 25 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 virtual int64_t GetSharedMemoryUsage(TaskId task_id) const = 0; | 80 virtual int64_t GetSharedMemoryUsage(TaskId task_id) const = 0; |
| 80 virtual int64_t GetSwappedMemoryUsage(TaskId task_id) const = 0; | 81 virtual int64_t GetSwappedMemoryUsage(TaskId task_id) const = 0; |
| 81 | 82 |
| 82 // Returns the GPU memory usage of the task with |task_id| in bytes. A value | 83 // 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. | 84 // of -1 means no valid value is currently available. |
| 84 // |has_duplicates| will be set to true if this process' GPU resource count is | 85 // |has_duplicates| will be set to true if this process' GPU resource count is |
| 85 // inflated because it is counting other processes' resources. | 86 // inflated because it is counting other processes' resources. |
| 86 virtual int64_t GetGpuMemoryUsage(TaskId task_id, | 87 virtual int64_t GetGpuMemoryUsage(TaskId task_id, |
| 87 bool* has_duplicates) const = 0; | 88 bool* has_duplicates) const = 0; |
| 88 | 89 |
| 90 // Returns the memory state of the task with |task_id|. |
| 91 virtual base::MemoryState GetMemoryState(TaskId task_id) const = 0; |
| 92 |
| 89 // Returns the number of average idle CPU wakeups per second since the last | 93 // Returns the number of average idle CPU wakeups per second since the last |
| 90 // refresh cycle. A value of -1 means no valid value is currently available. | 94 // refresh cycle. A value of -1 means no valid value is currently available. |
| 91 virtual int GetIdleWakeupsPerSecond(TaskId task_id) const = 0; | 95 virtual int GetIdleWakeupsPerSecond(TaskId task_id) const = 0; |
| 92 | 96 |
| 93 // Returns the NaCl GDB debug stub port. A value of | 97 // Returns the NaCl GDB debug stub port. A value of |
| 94 // |nacl::kGdbDebugStubPortUnknown| means no valid value is currently | 98 // |nacl::kGdbDebugStubPortUnknown| means no valid value is currently |
| 95 // available. A value of -2 means NaCl is not enabled for this build. | 99 // available. A value of -2 means NaCl is not enabled for this build. |
| 96 virtual int GetNaClDebugStubPort(TaskId task_id) const = 0; | 100 virtual int GetNaClDebugStubPort(TaskId task_id) const = 0; |
| 97 | 101 |
| 98 // On Windows, gets the current and peak number of GDI and USER handles in | 102 // On Windows, gets the current and peak number of GDI and USER handles in |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 | 274 |
| 271 // The flags containing the enabled resources types calculations. | 275 // The flags containing the enabled resources types calculations. |
| 272 int64_t enabled_resources_flags_; | 276 int64_t enabled_resources_flags_; |
| 273 | 277 |
| 274 DISALLOW_COPY_AND_ASSIGN(TaskManagerInterface); | 278 DISALLOW_COPY_AND_ASSIGN(TaskManagerInterface); |
| 275 }; | 279 }; |
| 276 | 280 |
| 277 } // namespace task_manager | 281 } // namespace task_manager |
| 278 | 282 |
| 279 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_INTERFACE_H_ | 283 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_INTERFACE_H_ |
| OLD | NEW |