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 CHROME_BROWSER_MEMORY_DETAILS_H_ | 5 #ifndef CHROME_BROWSER_MEMORY_DETAILS_H_ |
6 #define CHROME_BROWSER_MEMORY_DETAILS_H_ | 6 #define CHROME_BROWSER_MEMORY_DETAILS_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 RENDERER_CHROME, // WebUI (chrome:// URL) | 24 RENDERER_CHROME, // WebUI (chrome:// URL) |
25 RENDERER_EXTENSION, // chrome-extension:// | 25 RENDERER_EXTENSION, // chrome-extension:// |
26 RENDERER_DEVTOOLS, // Web inspector | 26 RENDERER_DEVTOOLS, // Web inspector |
27 RENDERER_INTERSTITIAL, // malware/phishing interstitial | 27 RENDERER_INTERSTITIAL, // malware/phishing interstitial |
28 RENDERER_NOTIFICATION, // HTML notification bubble | 28 RENDERER_NOTIFICATION, // HTML notification bubble |
29 RENDERER_BACKGROUND_APP // hosted app background page | 29 RENDERER_BACKGROUND_APP // hosted app background page |
30 }; | 30 }; |
31 | 31 |
32 static std::string GetRendererTypeNameInEnglish(RendererProcessType type); | 32 static std::string GetRendererTypeNameInEnglish(RendererProcessType type); |
33 static std::string GetFullTypeNameInEnglish( | 33 static std::string GetFullTypeNameInEnglish( |
34 content::ProcessType type, | 34 int process_type, |
35 RendererProcessType rtype); | 35 RendererProcessType rtype); |
36 | 36 |
37 ProcessMemoryInformation(); | 37 ProcessMemoryInformation(); |
38 ~ProcessMemoryInformation(); | 38 ~ProcessMemoryInformation(); |
39 | 39 |
40 // Default ordering is by private memory consumption. | 40 // Default ordering is by private memory consumption. |
41 bool operator<(const ProcessMemoryInformation& rhs) const; | 41 bool operator<(const ProcessMemoryInformation& rhs) const; |
42 | 42 |
43 // The process id. | 43 // The process id. |
44 base::ProcessId pid; | 44 base::ProcessId pid; |
45 // The working set information. | 45 // The working set information. |
46 base::WorkingSetKBytes working_set; | 46 base::WorkingSetKBytes working_set; |
47 // The committed bytes. | 47 // The committed bytes. |
48 base::CommittedKBytes committed; | 48 base::CommittedKBytes committed; |
49 // The process version | 49 // The process version |
50 string16 version; | 50 string16 version; |
51 // The process product name. | 51 // The process product name. |
52 string16 product_name; | 52 string16 product_name; |
53 // The number of processes which this memory represents. | 53 // The number of processes which this memory represents. |
54 int num_processes; | 54 int num_processes; |
55 // A process is a diagnostics process if it is rendering about:memory. | 55 // A process is a diagnostics process if it is rendering about:memory. |
56 // Mark this specially so that it can avoid counting it in its own | 56 // Mark this specially so that it can avoid counting it in its own |
57 // results. | 57 // results. |
58 bool is_diagnostics; | 58 bool is_diagnostics; |
59 // If this is a child process of Chrome, what type (i.e. plugin) it is. | 59 // If this is a child process of Chrome, what type (i.e. plugin) it is. |
60 content::ProcessType type; | 60 int process_type; |
61 // If this is a renderer process, what type it is. | 61 // If this is a renderer process, what type it is. |
62 RendererProcessType renderer_type; | 62 RendererProcessType renderer_type; |
63 // A collection of titles used, i.e. for a tab it'll show all the page titles. | 63 // A collection of titles used, i.e. for a tab it'll show all the page titles. |
64 std::vector<string16> titles; | 64 std::vector<string16> titles; |
65 }; | 65 }; |
66 | 66 |
67 typedef std::vector<ProcessMemoryInformation> ProcessMemoryInformationList; | 67 typedef std::vector<ProcessMemoryInformation> ProcessMemoryInformationList; |
68 | 68 |
69 // Browser Process Information. | 69 // Browser Process Information. |
70 struct ProcessData { | 70 struct ProcessData { |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 ProcessData* ChromeBrowser(); | 175 ProcessData* ChromeBrowser(); |
176 | 176 |
177 std::vector<ProcessData> process_data_; | 177 std::vector<ProcessData> process_data_; |
178 | 178 |
179 UserMetricsMode user_metrics_mode_; | 179 UserMetricsMode user_metrics_mode_; |
180 | 180 |
181 DISALLOW_COPY_AND_ASSIGN(MemoryDetails); | 181 DISALLOW_COPY_AND_ASSIGN(MemoryDetails); |
182 }; | 182 }; |
183 | 183 |
184 #endif // CHROME_BROWSER_MEMORY_DETAILS_H_ | 184 #endif // CHROME_BROWSER_MEMORY_DETAILS_H_ |
OLD | NEW |