| 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 28 matching lines...) Expand all Loading... |
| 39 // Whether an observer is interested in knowing if a process is foregrounded | 39 // Whether an observer is interested in knowing if a process is foregrounded |
| 40 // or backgrounded. | 40 // or backgrounded. |
| 41 REFRESH_TYPE_PRIORITY = 1 << 11, | 41 REFRESH_TYPE_PRIORITY = 1 << 11, |
| 42 | 42 |
| 43 #if defined(OS_LINUX) | 43 #if defined(OS_LINUX) |
| 44 // For observers interested in getting the number of open file descriptors of | 44 // For observers interested in getting the number of open file descriptors of |
| 45 // processes. | 45 // processes. |
| 46 REFRESH_TYPE_FD_COUNT = 1 << 12, | 46 REFRESH_TYPE_FD_COUNT = 1 << 12, |
| 47 #endif // defined(OS_LINUX) | 47 #endif // defined(OS_LINUX) |
| 48 | 48 |
| 49 REFRESH_TYPE_MEMORY_STATE = 1 << 13, |
| 50 |
| 49 REFRESH_TYPE_MEMORY = REFRESH_TYPE_PHYSICAL_MEMORY | | 51 REFRESH_TYPE_MEMORY = REFRESH_TYPE_PHYSICAL_MEMORY | |
| 50 REFRESH_TYPE_MEMORY_DETAILS, | 52 REFRESH_TYPE_MEMORY_DETAILS, |
| 51 }; | 53 }; |
| 52 | 54 |
| 53 // Defines the interface for observers of the task manager. | 55 // Defines the interface for observers of the task manager. |
| 54 class TaskManagerObserver { | 56 class TaskManagerObserver { |
| 55 public: | 57 public: |
| 56 static bool IsResourceRefreshEnabled(RefreshType refresh_type, | 58 static bool IsResourceRefreshEnabled(RefreshType refresh_type, |
| 57 int refresh_flags); | 59 int refresh_flags); |
| 58 | 60 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 // calculated on each refresh. | 141 // calculated on each refresh. |
| 140 int64_t desired_resources_flags_; | 142 int64_t desired_resources_flags_; |
| 141 | 143 |
| 142 DISALLOW_COPY_AND_ASSIGN(TaskManagerObserver); | 144 DISALLOW_COPY_AND_ASSIGN(TaskManagerObserver); |
| 143 }; | 145 }; |
| 144 | 146 |
| 145 } // namespace task_manager | 147 } // namespace task_manager |
| 146 | 148 |
| 147 | 149 |
| 148 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_OBSERVER_H_ | 150 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_OBSERVER_H_ |
| OLD | NEW |