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 memory { | 17 namespace memory { |
18 | 18 |
19 struct TabStats { | 19 struct TabStats { |
20 TabStats(); | 20 TabStats(); |
21 ~TabStats(); | 21 ~TabStats(); |
22 bool is_app; // Browser window is an app. | 22 bool is_app; // Browser window is an app. |
23 bool is_internal_page; // Internal page, such as NTP or Settings. | 23 bool is_internal_page; // Internal page, such as NTP or Settings. |
24 bool is_playing_audio; | 24 bool is_media; // Playing audio, acessing cam/mic or mirroring display. |
25 bool is_pinned; | 25 bool is_pinned; |
26 bool is_selected; // Selected in the currently active browser window. | 26 bool is_selected; // Selected in the currently active browser window. |
27 bool is_discarded; | 27 bool is_discarded; |
28 bool has_form_entry; // User has entered text in a form. | 28 bool has_form_entry; // User has entered text in a form. |
29 int discard_count; | 29 int discard_count; |
30 base::TimeTicks last_active; | 30 base::TimeTicks last_active; |
31 base::ProcessHandle renderer_handle; | 31 base::ProcessHandle renderer_handle; |
32 int child_process_host_id; | 32 int child_process_host_id; |
33 base::string16 title; | 33 base::string16 title; |
34 #if defined(OS_CHROMEOS) | 34 #if defined(OS_CHROMEOS) |
35 int oom_score; | 35 int oom_score; |
36 #endif | 36 #endif |
37 int64_t tab_contents_id; // Unique ID per WebContents. | 37 int64_t tab_contents_id; // Unique ID per WebContents. |
38 }; | 38 }; |
39 | 39 |
40 typedef std::vector<TabStats> TabStatsList; | 40 typedef std::vector<TabStats> TabStatsList; |
41 | 41 |
42 } // namespace memory | 42 } // namespace memory |
43 | 43 |
44 #endif // CHROME_BROWSER_MEMORY_TAB_STATS_H_ | 44 #endif // CHROME_BROWSER_MEMORY_TAB_STATS_H_ |
OLD | NEW |