OLD | NEW |
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_MEMORY_TAB_STATS_H_ | 5 #ifndef CHROME_BROWSER_MEMORY_TAB_STATS_H_ |
6 #define CHROME_BROWSER_MEMORY_TAB_STATS_H_ | 6 #define CHROME_BROWSER_MEMORY_TAB_STATS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/process/process.h" | 12 #include "base/process/process.h" |
13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
16 | 16 |
| 17 namespace content { |
| 18 class RenderProcessHost; |
| 19 } // namespace content |
| 20 |
17 namespace memory { | 21 namespace memory { |
18 | 22 |
19 struct TabStats { | 23 struct TabStats { |
20 TabStats(); | 24 TabStats(); |
21 ~TabStats(); | 25 ~TabStats(); |
22 bool is_app; // Browser window is an app. | 26 bool is_app; // Browser window is an app. |
23 bool is_internal_page; // Internal page, such as NTP or Settings. | 27 bool is_internal_page; // Internal page, such as NTP or Settings. |
24 bool is_media; // Playing audio, acessing cam/mic or mirroring display. | 28 bool is_media; // Playing audio, acessing cam/mic or mirroring display. |
25 bool is_pinned; | 29 bool is_pinned; |
26 bool is_selected; // Selected in the currently active browser window. | 30 bool is_selected; // Selected in the currently active browser window. |
27 bool is_discarded; | 31 bool is_discarded; |
28 bool has_form_entry; // User has entered text in a form. | 32 bool has_form_entry; // User has entered text in a form. |
29 int discard_count; | 33 int discard_count; |
30 base::TimeTicks last_active; | 34 base::TimeTicks last_active; |
| 35 content::RenderProcessHost* render_process_host; |
31 base::ProcessHandle renderer_handle; | 36 base::ProcessHandle renderer_handle; |
32 int child_process_host_id; | 37 int child_process_host_id; |
33 base::string16 title; | 38 base::string16 title; |
34 #if defined(OS_CHROMEOS) | 39 #if defined(OS_CHROMEOS) |
35 int oom_score; | 40 int oom_score; |
36 #endif | 41 #endif |
37 int64_t tab_contents_id; // Unique ID per WebContents. | 42 int64_t tab_contents_id; // Unique ID per WebContents. |
38 }; | 43 }; |
39 | 44 |
40 typedef std::vector<TabStats> TabStatsList; | 45 typedef std::vector<TabStats> TabStatsList; |
41 | 46 |
42 } // namespace memory | 47 } // namespace memory |
43 | 48 |
44 #endif // CHROME_BROWSER_MEMORY_TAB_STATS_H_ | 49 #endif // CHROME_BROWSER_MEMORY_TAB_STATS_H_ |
OLD | NEW |