Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_CHILD_PROCESS_DATA_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_CHILD_PROCESS_DATA_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_CHILD_PROCESS_DATA_H_ | 6 #define CONTENT_PUBLIC_BROWSER_CHILD_PROCESS_DATA_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | |
| 8 #include "base/process/process.h" | 9 #include "base/process/process.h" |
| 9 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 10 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "content/public/browser/process_resource_usage.h" | |
| 11 | 13 |
| 12 namespace content { | 14 namespace content { |
| 13 | 15 |
| 14 // Holds information about a child process. | 16 // Holds information about a child process. |
| 15 struct ChildProcessData { | 17 struct CONTENT_EXPORT ChildProcessData { |
| 16 // The type of the process. | 18 // The type of the process. |
| 17 int process_type; | 19 int process_type; |
| 18 | 20 |
| 19 // The name of the process. i.e. for plugins it might be Flash, while for | 21 // The name of the process. i.e. for plugins it might be Flash, while for |
| 20 // for workers it might be the domain that it's from. | 22 // for workers it might be the domain that it's from. |
| 21 base::string16 name; | 23 base::string16 name; |
| 22 | 24 |
| 23 // The unique identifier for this child process. This identifier is NOT a | 25 // The unique identifier for this child process. This identifier is NOT a |
| 24 // process ID, and will be unique for all types of child process for | 26 // process ID, and will be unique for all types of child process for |
| 25 // one run of the browser. | 27 // one run of the browser. |
| 26 int id; | 28 int id; |
| 27 | 29 |
| 28 // The handle to the process. May have value kNullProcessHandle if no process | 30 // The handle to the process. May have value kNullProcessHandle if no process |
| 29 // exists - either because it hasn't been started yet or it's running in the | 31 // exists - either because it hasn't been started yet or it's running in the |
| 30 // current process. | 32 // current process. |
| 31 base::ProcessHandle handle; | 33 base::ProcessHandle handle; |
| 32 | 34 |
| 33 explicit ChildProcessData(int process_type) | 35 // Resource usage reporter to obtain certain resource stats such as JS memory |
| 34 : process_type(process_type), id(0), handle(base::kNullProcessHandle) { | 36 // usage. May be null. |
| 35 } | 37 scoped_refptr<ProcessResourceUsage> process_resource_usage; |
|
ncarter (slow)
2015/05/01 21:16:52
As implemented, this modification does plumb the p
Anand Mistry (off Chromium)
2015/05/06 02:44:18
Done. It requires more plumbing, but isn't as bad
| |
| 38 | |
| 39 explicit ChildProcessData(int process_type); | |
| 40 ~ChildProcessData(); | |
| 36 }; | 41 }; |
| 37 | 42 |
| 38 } // namespace content | 43 } // namespace content |
| 39 | 44 |
| 40 #endif // CONTENT_PUBLIC_BROWSER_CHILD_PROCESS_DATA_H_ | 45 #endif // CONTENT_PUBLIC_BROWSER_CHILD_PROCESS_DATA_H_ |
| OLD | NEW |