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

Unified Diff: chrome/browser/task_management/providers/task.h

Issue 2028753002: Make Task Manager sort more meaningful (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unittest Created 4 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/task_management/providers/task.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_management/providers/task.h
diff --git a/chrome/browser/task_management/providers/task.h b/chrome/browser/task_management/providers/task.h
index a73090d0d9b2d88c840808f823f0ee03e0a721c8..bc5c3b25a44aee2f6b3c80fc2fe4e8c618d86822 100644
--- a/chrome/browser/task_management/providers/task.h
+++ b/chrome/browser/task_management/providers/task.h
@@ -28,30 +28,39 @@ namespace task_management {
// shared by multiple tasks.
class Task {
public:
+ // Note that the declaration order here determines the default sort order
+ // in the task manager.
enum Type {
UNKNOWN = 0,
- BROWSER, /* The main browser process. */
- RENDERER, /* A normal WebContents renderer process. */
- EXTENSION, /* An extension or app process. */
+
+ /* Singleton processes first that don't belong to a particular tab. */
+ BROWSER, /* The main browser process. */
+ GPU, /* A graphics process. */
+ ARC, /* An ARC process. */
+ ZYGOTE, /* A Linux zygote process. */
+ UTILITY, /* A browser utility process. */
+
+ /* Per-Tab processes next. */
+ RENDERER, /* A normal WebContents renderer process. */
+ EXTENSION, /* An extension or app process. */
+
+ /* Plugin processes last.*/
GUEST, /* A browser plugin guest process. */
PLUGIN, /* A plugin process. */
WORKER, /* A web worker process. */
NACL, /* A NativeClient loader or broker process. */
- UTILITY, /* A browser utility process. */
- ZYGOTE, /* A Linux zygote process. */
SANDBOX_HELPER, /* A sandbox helper process. */
- GPU, /* A graphics process. */
- ARC, /* An ARC process. */
};
// Create a task with the given |title| and the given favicon |icon|. This
// task runs on a process whose handle is |handle|. |rappor_sample| is the
// name of the sample to be recorded if this task needs to be reported by
- // Rappor.
+ // Rappor. If |process_id| is not supplied, it will be determined by |handle|.
Task(const base::string16& title,
const std::string& rappor_sample,
const gfx::ImageSkia* icon,
- base::ProcessHandle handle);
+ base::ProcessHandle handle,
+ base::ProcessId process_id = base::kNullProcessId);
virtual ~Task();
// Gets the name of the given |profile| from the ProfileAttributesStorage.
@@ -102,6 +111,12 @@ class Task {
// a renderer, or a contents of a tab.
virtual int GetTabId() const;
+ // For Tasks that represent a subactivity of some other task (e.g. a plugin
+ // embedded in a page), this returns the Task representing the parent
+ // activity.
+ bool HasParentTask() const;
+ virtual const Task* GetParentTask() const;
+
// Getting the Sqlite used memory (in bytes). Not all tasks reports Sqlite
// memory, in this case a default invalid value of -1 will be returned.
// Check for whether the task reports it or not first.
« no previous file with comments | « no previous file | chrome/browser/task_management/providers/task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698