1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 package org.chromium.base.process_launcher;
6 
7 import android.os.Bundle;
8 
9 import org.chromium.base.process_launcher.ICallbackInt;
10 
11 interface IChildProcessService {
12   // On the first call to this method, the service will record the calling PID
13   // and return true. Subsequent calls will only return true if the calling PID
14   // is the same as the recorded one.
bindToCaller()15   boolean bindToCaller();
16 
17   // Sets up the initial IPC channel.
setupConnection(in Bundle args, ICallbackInt pidCallback, in List<IBinder> clientInterfaces)18   oneway void setupConnection(in Bundle args, ICallbackInt pidCallback,
19           in List<IBinder>  clientInterfaces);
20 
21   // Forcefully kills the child process.
forceKill()22   oneway void forceKill();
23 
24   // Notifies about memory pressure. The argument is MemoryPressureLevel enum.
onMemoryPressure(int pressure)25   oneway void onMemoryPressure(int pressure);
26 }
27