Chromium Code Reviews| 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 // Next MinVersion: 5 | 5 // Next MinVersion: 6 |
| 6 | 6 |
| 7 module arc.mojom; | 7 module arc.mojom; |
| 8 | 8 |
| 9 // Describes the current process state, as defined by AOSP in | 9 // Describes the current process state, as defined by AOSP in |
| 10 // android.app.ActivityManager. | 10 // android.app.ActivityManager. |
| 11 enum ProcessState { | 11 enum ProcessState { |
| 12 // Process does not exist. | 12 // Process does not exist. |
| 13 NONEXISTENT = -1, | 13 NONEXISTENT = -1, |
| 14 | 14 |
| 15 // Process is a persistent system process. | 15 // Process is a persistent system process. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 | 67 |
| 68 // Process is being cached for later use and is a client of another cached | 68 // Process is being cached for later use and is a client of another cached |
| 69 // process that contains activities. | 69 // process that contains activities. |
| 70 CACHED_ACTIVITY_CLIENT = 15, | 70 CACHED_ACTIVITY_CLIENT = 15, |
| 71 | 71 |
| 72 // Process is being cached for later use and is empty. | 72 // Process is being cached for later use and is empty. |
| 73 CACHED_EMPTY = 16, | 73 CACHED_EMPTY = 16, |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 // Describes a running ARC process. | 76 // Describes a running ARC process. |
| 77 // This struct is a subset of android.app.ActivityManager.RunningAppProcessInfo. | 77 // This struct is a subset of android.app.ActivityManager.RunningAppProcessInfo. |
|
Luis Héctor Chávez
2016/06/28 15:43:53
You should probably remove this comment.
cylee1
2016/07/14 19:15:25
Replied in the previous patch set. It's still a su
| |
| 78 struct RunningAppProcessInfo { | 78 struct RunningAppProcessInfo { |
| 79 // Name of the process. | 79 // Name of the process. |
| 80 string process_name; | 80 string process_name; |
| 81 | 81 |
| 82 // PID (within ARC's PID namespace) of the process. | 82 // PID (within ARC's PID namespace) of the process. |
| 83 uint32 pid; | 83 uint32 pid; |
| 84 | 84 |
| 85 // Current process state. | 85 // Current process state. |
| 86 // TODO(cylee): Deprecate it if nobody uses it. | |
| 86 ProcessState process_state; | 87 ProcessState process_state; |
| 87 | 88 |
| 88 // Package names running in the process. | 89 // Package names running in the process. |
| 89 [MinVersion=4] array<string>? packages; | 90 [MinVersion=4] array<string>? packages; |
| 91 | |
| 92 // Current OOM adjustment level of the process, calculated by | |
| 93 // Android ActivityManagerService. | |
| 94 [MinVersion=5] int32 adj; | |
| 95 | |
| 96 // Last time the process was active. Milliseconds since boot. | |
| 97 // The clock is monotonic (comes from Android System.uptimeMillis()). | |
| 98 [MinVersion=5] int64 last_activity_time; | |
| 90 }; | 99 }; |
| 91 | 100 |
| 92 interface ProcessInstance { | 101 interface ProcessInstance { |
| 93 // Requests ARC instance to return the current process list. | 102 // Requests ARC instance to return the current process list. |
| 94 RequestProcessList@0() => (array<RunningAppProcessInfo> processes); | 103 RequestProcessList@0() => (array<RunningAppProcessInfo> processes); |
| 95 | 104 |
| 96 // Requests ARC instance to kill a process. | 105 // Requests ARC instance to kill a process. |
| 97 [MinVersion=1] | 106 [MinVersion=1] |
| 98 KillProcess@1(uint32 pid, string reason); | 107 KillProcess@1(uint32 pid, string reason); |
| 99 | 108 |
| 100 // Sets oom_score_adj of a process. | 109 // Sets oom_score_adj of a process. |
| 101 [MinVersion=2] | 110 [MinVersion=2] |
| 102 SetOomScoreAdj@2(uint32 pid, int32 score); | 111 SetOomScoreAdj@2(uint32 pid, int32 score); |
| 103 | 112 |
| 104 // Disables Android built-in oom_adj adjustment. | 113 // Disables Android built-in oom_adj adjustment. |
| 105 [MinVersion=2] | 114 [MinVersion=2] |
| 106 DisableBuiltinOomAdjustment@3(); | 115 DisableBuiltinOomAdjustment@3(); |
| 107 | 116 |
| 108 // Disables Android lowmemorykiller. | 117 // Disables Android lowmemorykiller. |
| 109 [MinVersion=3] | 118 [MinVersion=3] |
| 110 DisableLowMemoryKiller@4(); | 119 DisableLowMemoryKiller@4(); |
| 111 }; | 120 }; |
| OLD | NEW |