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