| Index: chrome/browser/chromeos/arc/arc_process.h
|
| diff --git a/chrome/browser/chromeos/arc/arc_process.h b/chrome/browser/chromeos/arc/arc_process.h
|
| index 01562a25006edb5e8bda1b62bb6f0ad02d80f6e1..81a6e89be022689e9897602e7f0f4ea8adb9ccaa 100644
|
| --- a/chrome/browser/chromeos/arc/arc_process.h
|
| +++ b/chrome/browser/chromeos/arc/arc_process.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_PROCESS_H_
|
| #define CHROME_BROWSER_CHROMEOS_ARC_ARC_PROCESS_H_
|
|
|
| +#include <stdint.h>
|
| #include <string>
|
| #include <vector>
|
|
|
| @@ -18,16 +19,23 @@ class ArcProcess {
|
| ArcProcess(base::ProcessId nspid,
|
| base::ProcessId pid,
|
| const std::string& process_name,
|
| - mojom::ProcessState process_state);
|
| + mojom::ProcessState process_state,
|
| + bool is_focused,
|
| + int64_t last_activity_time);
|
| ~ArcProcess();
|
|
|
| ArcProcess(ArcProcess&& other);
|
| ArcProcess& operator=(ArcProcess&& other);
|
|
|
| + // Sort by descending importance.
|
| + bool operator<(const ArcProcess& rhs) const;
|
| +
|
| base::ProcessId nspid() const { return nspid_; }
|
| base::ProcessId pid() const { return pid_; }
|
| const std::string& process_name() const { return process_name_; }
|
| mojom::ProcessState process_state() const { return process_state_; }
|
| + bool is_focused() const { return is_focused_; }
|
| + int64_t last_activity_time() const { return last_activity_time_; }
|
| std::vector<std::string>& packages() { return packages_; }
|
| const std::vector<std::string>& packages() const { return packages_; }
|
|
|
| @@ -36,6 +44,12 @@ class ArcProcess {
|
| base::ProcessId pid_;
|
| std::string process_name_;
|
| mojom::ProcessState process_state_;
|
| + // If the Android app is the focused window.
|
| + bool is_focused_;
|
| + // A monotonic timer recording the last time this process was active.
|
| + // Milliseconds since Android boot. This info is passed from Android
|
| + // ActivityManagerService via IPC.
|
| + int64_t last_activity_time_;
|
| std::vector<std::string> packages_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ArcProcess);
|
|
|