| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 ProcessState process_state; | 86 ProcessState process_state; |
| 87 | 87 |
| 88 // Package names running in the process. | 88 // Package names running in the process. |
| 89 [MinVersion=4] array<string>? packages; | 89 [MinVersion=4] array<string>? packages; |
| 90 |
| 91 // Whether this app is focused in ARC++ multi-window environment. |
| 92 [MinVersion=5] bool is_focused; |
| 93 |
| 94 // Last time the process was active. Milliseconds since boot. |
| 95 // The clock is monotonic (comes from Android System.uptimeMillis()). |
| 96 [MinVersion=5] int64 last_activity_time; |
| 90 }; | 97 }; |
| 91 | 98 |
| 92 interface ProcessInstance { | 99 interface ProcessInstance { |
| 93 // Requests ARC instance to return the current process list. | 100 // Requests ARC instance to return the current process list. |
| 94 RequestProcessList@0() => (array<RunningAppProcessInfo> processes); | 101 RequestProcessList@0() => (array<RunningAppProcessInfo> processes); |
| 95 | 102 |
| 96 // Requests ARC instance to kill a process. | 103 // Requests ARC instance to kill a process. |
| 97 [MinVersion=1] | 104 [MinVersion=1] |
| 98 KillProcess@1(uint32 pid, string reason); | 105 KillProcess@1(uint32 pid, string reason); |
| 99 | 106 |
| 100 // Sets oom_score_adj of a process. | 107 // Sets oom_score_adj of a process. |
| 101 [MinVersion=2] | 108 [MinVersion=2] |
| 102 SetOomScoreAdj@2(uint32 pid, int32 score); | 109 SetOomScoreAdj@2(uint32 pid, int32 score); |
| 103 | 110 |
| 104 // Disables Android built-in oom_adj adjustment. | 111 // Disables Android built-in oom_adj adjustment. |
| 105 [MinVersion=2] | 112 [MinVersion=2] |
| 106 DisableBuiltinOomAdjustment@3(); | 113 DisableBuiltinOomAdjustment@3(); |
| 107 | 114 |
| 108 // Disables Android lowmemorykiller. | 115 // Disables Android lowmemorykiller. |
| 109 [MinVersion=3] | 116 [MinVersion=3] |
| 110 DisableLowMemoryKiller@4(); | 117 DisableLowMemoryKiller@4(); |
| 111 }; | 118 }; |
| OLD | NEW |