Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(372)

Unified Diff: components/arc/common/process.mojom

Issue 1523643002: arc-bridge: Move most methods to Mojo interfaces (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Rebased to ToT Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/arc/common/power.mojom ('k') | components/arc/common/settings.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/common/process.mojom
diff --git a/components/arc/common/process.mojom b/components/arc/common/process.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..c6268f9bed7d03d2e8ae58cf17d2f51219f0dfa6
--- /dev/null
+++ b/components/arc/common/process.mojom
@@ -0,0 +1,90 @@
+// 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.
+
+module arc;
+
+// Describes the current process state, as defined by AOSP in
+// android.app.ActivityManager.
+enum ProcessState {
+ // Process does not exist.
+ NONEXISTENT = -1,
+
+ // Process is a persistent system process.
+ PERSISTENT = 0,
+
+ // Process is a persistent system process and is doing UI.
+ PERSISTENT_UI = 1,
+
+ // Process is hosting the current top activities. Note that this covers
+ // all activities that are visible to the user.
+ TOP = 2,
+
+ // Process is hosting a foreground service due to a system binding.
+ BOUND_FOREGROUND_SERVICE = 3,
+
+ // Process is hosting a foreground service.
+ FOREGROUND_SERVICE = 4,
+
+ // Same as PROCESS_STATE_TOP but while device is sleeping.
+ TOP_SLEEPING = 5,
+
+ // Process is important to the user, and something they are aware of.
+ IMPORTANT_FOREGROUND = 6,
+
+ // Process is important to the user, but not something they are aware of.
+ IMPORTANT_BACKGROUND = 7,
+
+ // Process is in the background running a backup/restore operation.
+ BACKUP = 8,
+
+ // Process is in the background, but it can't restore its state so we want
+ // to try to avoid killing it.
+ HEAVY_WEIGHT = 9,
+
+ // Process is in the background running a service. Unlike oom_adj, this level
+ // is used for both the normal running in background state and the executing
+ // operations state.
+ SERVICE = 10,
+
+ // Process is in the background running a receiver. Note that from the
+ // perspective of oom_adj receivers run at a higher foreground level, but for
+ // our prioritization here that is not necessary and putting them below
+ // services means many fewer changes in some process states as they receive
+ // broadcasts.
+ RECEIVER = 11,
+
+ // Process is in the background but hosts the home activity.
+ HOME = 12,
+
+ // Process is in the background but hosts the last shown activity.
+ LAST_ACTIVITY = 13,
+
+ // Process is being cached for later use and contains activities.
+ CACHED_ACTIVITY = 14,
+
+ // Process is being cached for later use and is a client of another cached
+ // process that contains activities.
+ CACHED_ACTIVITY_CLIENT = 15,
+
+ // Process is being cached for later use and is empty.
+ CACHED_EMPTY = 16,
+};
+
+// Describes a running ARC process.
+// This struct is a subset of android.app.ActivityManager.RunningAppProcessInfo.
+struct RunningAppProcessInfo {
+ // Name of the process.
+ string process_name;
+
+ // PID (within ARC's PID namespace) of the process.
+ uint32 pid;
+
+ // Current process state.
+ ProcessState process_state;
+};
+
+interface ProcessInstance {
+ // Requests ARC instance to return the current process list.
+ RequestProcessList() => (array<RunningAppProcessInfo> processes);
+};
« no previous file with comments | « components/arc/common/power.mojom ('k') | components/arc/common/settings.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698