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/27 16:18:07
This is not true anymore.
cylee1
2016/06/28 18:14:17
It's still true since I added the 2 attributes to
| |
| 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. | |
|
Yusuke Sato
2016/06/27 16:40:51
I think https://codereview.chromium.org/2059483003
cylee1
2016/07/14 19:15:24
I see. In my first implementation I should change
| |
| 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; | |
|
Yusuke Sato
2016/06/27 16:40:51
I understand AMS calls this "adj" but in Chromium,
cylee1
2016/07/14 19:15:24
Changed.
| |
| 95 | |
| 96 // Last time the process is active. Milliseconds since boot. | |
|
Luis Héctor Chávez
2016/06/27 16:18:07
nit: "process was active". Also, please mention if
cylee1
2016/06/28 18:14:17
Done.
| |
| 97 [MinVersion=5] int64 last_activity_time; | |
| 90 }; | 98 }; |
| 91 | 99 |
| 92 interface ProcessInstance { | 100 interface ProcessInstance { |
| 93 // Requests ARC instance to return the current process list. | 101 // Requests ARC instance to return the current process list. |
| 94 RequestProcessList@0() => (array<RunningAppProcessInfo> processes); | 102 RequestProcessList@0() => (array<RunningAppProcessInfo> processes); |
| 95 | 103 |
| 96 // Requests ARC instance to kill a process. | 104 // Requests ARC instance to kill a process. |
| 97 [MinVersion=1] | 105 [MinVersion=1] |
| 98 KillProcess@1(uint32 pid, string reason); | 106 KillProcess@1(uint32 pid, string reason); |
| 99 | 107 |
| 100 // Sets oom_score_adj of a process. | 108 // Sets oom_score_adj of a process. |
| 101 [MinVersion=2] | 109 [MinVersion=2] |
| 102 SetOomScoreAdj@2(uint32 pid, int32 score); | 110 SetOomScoreAdj@2(uint32 pid, int32 score); |
| 103 | 111 |
| 104 // Disables Android built-in oom_adj adjustment. | 112 // Disables Android built-in oom_adj adjustment. |
| 105 [MinVersion=2] | 113 [MinVersion=2] |
| 106 DisableBuiltinOomAdjustment@3(); | 114 DisableBuiltinOomAdjustment@3(); |
| 107 | 115 |
| 108 // Disables Android lowmemorykiller. | 116 // Disables Android lowmemorykiller. |
| 109 [MinVersion=3] | 117 [MinVersion=3] |
| 110 DisableLowMemoryKiller@4(); | 118 DisableLowMemoryKiller@4(); |
| 111 }; | 119 }; |
| OLD | NEW |