1 // Copyright 2016 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; 6 7 import android.app.Service; 8 import android.content.Intent; 9 import android.os.IBinder; 10 11 import org.chromium.base.process_launcher.ChildProcessService; 12 13 /** The service implementation used to host all multiprocess test client code. */ 14 public class MultiprocessTestClientService extends Service { 15 private ChildProcessService mService; 16 MultiprocessTestClientService()17 public MultiprocessTestClientService() {} 18 19 @Override onCreate()20 public void onCreate() { 21 super.onCreate(); 22 mService = new ChildProcessService( 23 new MultiprocessTestClientServiceDelegate(), this, getApplicationContext()); 24 mService.onCreate(); 25 } 26 27 @Override onDestroy()28 public void onDestroy() { 29 super.onDestroy(); 30 mService.onDestroy(); 31 mService = null; 32 } 33 34 @Override onBind(Intent intent)35 public IBinder onBind(Intent intent) { 36 return mService.onBind(intent); 37 } 38 } 39