| 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_MANAGEMENT_TASK_MANAGER_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_OBSERVER_H_ | 6 #define CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 REFRESH_TYPE_CPU = 1, | 23 REFRESH_TYPE_CPU = 1, |
| 24 REFRESH_TYPE_MEMORY = 1 << 1, | 24 REFRESH_TYPE_MEMORY = 1 << 1, |
| 25 REFRESH_TYPE_GPU_MEMORY = 1 << 2, | 25 REFRESH_TYPE_GPU_MEMORY = 1 << 2, |
| 26 REFRESH_TYPE_V8_MEMORY = 1 << 3, | 26 REFRESH_TYPE_V8_MEMORY = 1 << 3, |
| 27 REFRESH_TYPE_SQLITE_MEMORY = 1 << 4, | 27 REFRESH_TYPE_SQLITE_MEMORY = 1 << 4, |
| 28 REFRESH_TYPE_WEBCACHE_STATS = 1 << 5, | 28 REFRESH_TYPE_WEBCACHE_STATS = 1 << 5, |
| 29 REFRESH_TYPE_NETWORK_USAGE = 1 << 6, | 29 REFRESH_TYPE_NETWORK_USAGE = 1 << 6, |
| 30 REFRESH_TYPE_NACL = 1 << 7, | 30 REFRESH_TYPE_NACL = 1 << 7, |
| 31 REFRESH_TYPE_IDLE_WAKEUPS = 1 << 8, | 31 REFRESH_TYPE_IDLE_WAKEUPS = 1 << 8, |
| 32 REFRESH_TYPE_HANDLES = 1 << 9, | 32 REFRESH_TYPE_HANDLES = 1 << 9, |
| 33 REFRESH_TYPE_PRIORITY = 1 << 10, // Whether an observer is interested |
| 34 // in knowing if a process is |
| 35 // foregrounded or backgrounded. |
| 33 }; | 36 }; |
| 34 | 37 |
| 35 // Defines the interface for observers of the task manager. | 38 // Defines the interface for observers of the task manager. |
| 36 class TaskManagerObserver { | 39 class TaskManagerObserver { |
| 37 public: | 40 public: |
| 38 // Constructs a TaskManagerObserver given the minimum |refresh_time| that it | 41 // Constructs a TaskManagerObserver given the minimum |refresh_time| that it |
| 39 // it requires the task manager to be refreshing the values at, along with the | 42 // it requires the task manager to be refreshing the values at, along with the |
| 40 // |resources_flags| that it needs to be calculated on each refresh cycle of | 43 // |resources_flags| that it needs to be calculated on each refresh cycle of |
| 41 // the task manager (use the above flags in |ResourceType|). | 44 // the task manager (use the above flags in |ResourceType|). |
| 42 // | 45 // |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // calculated on each refresh. | 104 // calculated on each refresh. |
| 102 int64 desired_resources_flags_; | 105 int64 desired_resources_flags_; |
| 103 | 106 |
| 104 DISALLOW_COPY_AND_ASSIGN(TaskManagerObserver); | 107 DISALLOW_COPY_AND_ASSIGN(TaskManagerObserver); |
| 105 }; | 108 }; |
| 106 | 109 |
| 107 } // namespace task_management | 110 } // namespace task_management |
| 108 | 111 |
| 109 | 112 |
| 110 #endif // CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_OBSERVER_H_ | 113 #endif // CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_OBSERVER_H_ |
| OLD | NEW |