Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(890)

Unified Diff: chrome/browser/task_management/task_manager_observer.h

Issue 1584473004: Migrate ProcessesEventRouter to the new task manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nit. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/task_management/task_manager_observer.h
diff --git a/chrome/browser/task_management/task_manager_observer.h b/chrome/browser/task_management/task_manager_observer.h
index 408d2a87f6ab73f131ca34741b2a7832803e54a0..84f2c215e00288c525f3f648625e65c9080bd961 100644
--- a/chrome/browser/task_management/task_manager_observer.h
+++ b/chrome/browser/task_management/task_manager_observer.h
@@ -86,6 +86,22 @@ class TaskManagerObserver {
// IDs themselves.
virtual void OnTasksRefreshed(const TaskIdList& task_ids) = 0;
+ // Notifies the observer that the task manager has just finished a refresh
+ // cycle that calculated all the resource usage of all tasks whose IDs are in
+ // |task_ids| including the resource usages that are calculated in the
+ // background such CPU and memory (If those refresh types are enabled).
+ // This event can take longer to be fired, and can miss some changes that may
+ // happen to non-background calculations in-between two successive
+ // invocations. Listen to this ONLY if you must know when all the background
+ // resource calculations to be valid for all the available processes.
+ // |task_ids| will be sorted as specified in OnTasksRefreshed() above.
+ virtual void OnTasksRefreshedWithBackgroundCalculations(
+ const TaskIdList& task_ids) {}
+
+ // Notifies the observer that the task with |id| is running on a renderer that
+ // has become unresponsive.
+ virtual void OnTaskUnresponsive(TaskId id) {}
+
const base::TimeDelta& desired_refresh_time() const {
return desired_refresh_time_;
}
@@ -100,6 +116,7 @@ class TaskManagerObserver {
// Add or Remove a refresh |type|.
void AddRefreshType(RefreshType type);
void RemoveRefreshType(RefreshType type);
+ void SetRefreshTypesFlags(int64_t flags);
private:
friend class TaskManagerInterface;
« no previous file with comments | « chrome/browser/task_management/task_manager_interface.cc ('k') | chrome/browser/task_management/task_manager_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698