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

Side by Side Diff: chrome/browser/task_management/providers/task.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 unified diff | Download patch
OLDNEW
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_PROVIDERS_TASK_H_ 5 #ifndef CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_TASK_H_
6 #define CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_TASK_H_ 6 #define CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_TASK_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/process/kill.h"
13 #include "base/process/process_handle.h" 14 #include "base/process/process_handle.h"
14 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
15 #include "base/time/time.h" 16 #include "base/time/time.h"
16 #include "third_party/WebKit/public/web/WebCache.h" 17 #include "third_party/WebKit/public/web/WebCache.h"
17 #include "ui/gfx/image/image_skia.h" 18 #include "ui/gfx/image/image_skia.h"
18 19
19 class Profile; 20 class Profile;
20 21
21 namespace task_management { 22 namespace task_management {
22 23
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // Returns the task type. 79 // Returns the task type.
79 virtual Type GetType() const = 0; 80 virtual Type GetType() const = 0;
80 81
81 // This is the unique ID of the BrowserChildProcessHost/RenderProcessHost. It 82 // This is the unique ID of the BrowserChildProcessHost/RenderProcessHost. It
82 // is not the PID nor the handle of the process. 83 // is not the PID nor the handle of the process.
83 // For a task that represents the browser process, the return value is 0. For 84 // For a task that represents the browser process, the return value is 0. For
84 // other tasks that represent renderers and other child processes, the return 85 // other tasks that represent renderers and other child processes, the return
85 // value is whatever unique IDs of their hosts in the browser process. 86 // value is whatever unique IDs of their hosts in the browser process.
86 virtual int GetChildProcessUniqueID() const = 0; 87 virtual int GetChildProcessUniqueID() const = 0;
87 88
89 // If the process, in which this task is running, is terminated, this gets the
90 // termination status. Currently implemented only for Renderer processes.
91 virtual void GetTerminationStatus(base::TerminationStatus* out_status,
92 int* out_error_code) const;
93
88 // The name of the profile owning this task. 94 // The name of the profile owning this task.
89 virtual base::string16 GetProfileName() const; 95 virtual base::string16 GetProfileName() const;
90 96
97 // Returns the unique ID of the tab if this task represents a renderer
98 // WebContents used for a tab. Returns -1 if this task does not represent
99 // a renderer, or a contents of a tab.
100 virtual int GetTabId() const;
101
91 // Getting the Sqlite used memory (in bytes). Not all tasks reports Sqlite 102 // Getting the Sqlite used memory (in bytes). Not all tasks reports Sqlite
92 // memory, in this case a default invalid value of -1 will be returned. 103 // memory, in this case a default invalid value of -1 will be returned.
93 // Check for whether the task reports it or not first. 104 // Check for whether the task reports it or not first.
94 bool ReportsSqliteMemory() const; 105 bool ReportsSqliteMemory() const;
95 virtual int64_t GetSqliteMemoryUsed() const; 106 virtual int64_t GetSqliteMemoryUsed() const;
96 107
97 // Getting the allocated and used V8 memory (in bytes). Not all tasks reports 108 // Getting the allocated and used V8 memory (in bytes). Not all tasks reports
98 // V8 memory, in this case a default invalid value of -1 will be returned. 109 // V8 memory, in this case a default invalid value of -1 will be returned.
99 // Check for whether the task reports it or not first. 110 // Check for whether the task reports it or not first.
100 bool ReportsV8Memory() const; 111 bool ReportsV8Memory() const;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 163
153 // The PID of the process on which this task is running. 164 // The PID of the process on which this task is running.
154 const base::ProcessId process_id_; 165 const base::ProcessId process_id_;
155 166
156 DISALLOW_COPY_AND_ASSIGN(Task); 167 DISALLOW_COPY_AND_ASSIGN(Task);
157 }; 168 };
158 169
159 } // namespace task_management 170 } // namespace task_management
160 171
161 #endif // CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_TASK_H_ 172 #endif // CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_TASK_H_
OLDNEW
« no previous file with comments | « chrome/browser/task_management/providers/arc/arc_process_task.cc ('k') | chrome/browser/task_management/providers/task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698