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

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 edge case in detecting background calculations completion Created 4 years, 10 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..2aca5135459de560e2b80172daacc56b55ccd5e8 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_;
}

Powered by Google App Engine
This is Rietveld 408576698