summaryrefslogtreecommitdiffstats
path: root/chrome/browser/memory/tab_stats.h
blob: 00de0e0dd7feec513d90198e006c10ebc2b3124f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_MEMORY_TAB_STATS_H_
#define CHROME_BROWSER_MEMORY_TAB_STATS_H_

#include <stdint.h>

#include <vector>

#include "base/process/process.h"
#include "base/strings/string16.h"
#include "base/time/time.h"
#include "build/build_config.h"

namespace memory {

struct TabStats {
  TabStats();
  ~TabStats();
  bool is_app;            // Browser window is an app.
  bool is_internal_page;  // Internal page, such as NTP or Settings.
  bool is_playing_audio;
  bool is_pinned;
  bool is_selected;  // Selected in the currently active browser window.
  bool is_discarded;
  bool has_form_entry;  // User has entered text in a form.
  int discard_count;
  base::TimeTicks last_active;
  base::ProcessHandle renderer_handle;
  int child_process_host_id;
  base::string16 title;
#if defined(OS_CHROMEOS)
  int oom_score;
#endif
  int64_t tab_contents_id;  // Unique ID per WebContents.
};

typedef std::vector<TabStats> TabStatsList;

}  // namespace memory

#endif  // CHROME_BROWSER_MEMORY_TAB_STATS_H_