| 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_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_OBSERVER_H_ | 6 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 REFRESH_TYPE_PHYSICAL_MEMORY = 1 << 1, | 28 REFRESH_TYPE_PHYSICAL_MEMORY = 1 << 1, |
| 29 REFRESH_TYPE_MEMORY_DETAILS = 1 << 2, | 29 REFRESH_TYPE_MEMORY_DETAILS = 1 << 2, |
| 30 REFRESH_TYPE_GPU_MEMORY = 1 << 3, | 30 REFRESH_TYPE_GPU_MEMORY = 1 << 3, |
| 31 REFRESH_TYPE_V8_MEMORY = 1 << 4, | 31 REFRESH_TYPE_V8_MEMORY = 1 << 4, |
| 32 REFRESH_TYPE_SQLITE_MEMORY = 1 << 5, | 32 REFRESH_TYPE_SQLITE_MEMORY = 1 << 5, |
| 33 REFRESH_TYPE_WEBCACHE_STATS = 1 << 6, | 33 REFRESH_TYPE_WEBCACHE_STATS = 1 << 6, |
| 34 REFRESH_TYPE_NETWORK_USAGE = 1 << 7, | 34 REFRESH_TYPE_NETWORK_USAGE = 1 << 7, |
| 35 REFRESH_TYPE_NACL = 1 << 8, | 35 REFRESH_TYPE_NACL = 1 << 8, |
| 36 REFRESH_TYPE_IDLE_WAKEUPS = 1 << 9, | 36 REFRESH_TYPE_IDLE_WAKEUPS = 1 << 9, |
| 37 REFRESH_TYPE_HANDLES = 1 << 10, | 37 REFRESH_TYPE_HANDLES = 1 << 10, |
| 38 REFRESH_TYPE_START_TIME = 1 << 11, |
| 39 REFRESH_TYPE_CPU_TIME = 1 << 12, |
| 38 | 40 |
| 39 // Whether an observer is interested in knowing if a process is foregrounded | 41 // Whether an observer is interested in knowing if a process is foregrounded |
| 40 // or backgrounded. | 42 // or backgrounded. |
| 41 REFRESH_TYPE_PRIORITY = 1 << 11, | 43 REFRESH_TYPE_PRIORITY = 1 << 13, |
| 42 | 44 |
| 43 #if defined(OS_LINUX) | 45 #if defined(OS_LINUX) |
| 44 // For observers interested in getting the number of open file descriptors of | 46 // For observers interested in getting the number of open file descriptors of |
| 45 // processes. | 47 // processes. |
| 46 REFRESH_TYPE_FD_COUNT = 1 << 12, | 48 REFRESH_TYPE_FD_COUNT = 1 << 14, |
| 47 #endif // defined(OS_LINUX) | 49 #endif // defined(OS_LINUX) |
| 48 | 50 |
| 49 REFRESH_TYPE_MEMORY_STATE = 1 << 13, | 51 REFRESH_TYPE_MEMORY_STATE = 1 << 15, |
| 50 | 52 |
| 51 REFRESH_TYPE_MEMORY = REFRESH_TYPE_PHYSICAL_MEMORY | | 53 REFRESH_TYPE_MEMORY = REFRESH_TYPE_PHYSICAL_MEMORY | |
| 52 REFRESH_TYPE_MEMORY_DETAILS, | 54 REFRESH_TYPE_MEMORY_DETAILS, |
| 53 }; | 55 }; |
| 54 | 56 |
| 55 // Defines the interface for observers of the task manager. | 57 // Defines the interface for observers of the task manager. |
| 56 class TaskManagerObserver { | 58 class TaskManagerObserver { |
| 57 public: | 59 public: |
| 58 static bool IsResourceRefreshEnabled(RefreshType refresh_type, | 60 static bool IsResourceRefreshEnabled(RefreshType refresh_type, |
| 59 int refresh_flags); | 61 int refresh_flags); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // calculated on each refresh. | 143 // calculated on each refresh. |
| 142 int64_t desired_resources_flags_; | 144 int64_t desired_resources_flags_; |
| 143 | 145 |
| 144 DISALLOW_COPY_AND_ASSIGN(TaskManagerObserver); | 146 DISALLOW_COPY_AND_ASSIGN(TaskManagerObserver); |
| 145 }; | 147 }; |
| 146 | 148 |
| 147 } // namespace task_manager | 149 } // namespace task_manager |
| 148 | 150 |
| 149 | 151 |
| 150 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_OBSERVER_H_ | 152 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_OBSERVER_H_ |
| OLD | NEW |