OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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.content.browser; |
| 6 |
| 7 import android.content.Context; |
| 8 import android.os.IBinder; |
| 9 |
| 10 import org.chromium.base.process_launcher.ChildProcessCreationParams; |
| 11 import org.chromium.base.process_launcher.FileDescriptorInfo; |
| 12 import org.chromium.content.browser.ChildProcessLauncher.LaunchCallback; |
| 13 |
| 14 /** Contains the information necessary to start a child process. */ |
| 15 class ChildSpawnData { |
| 16 private final Context mContext; |
| 17 private final String[] mCommandLine; |
| 18 private final int mChildProcessId; |
| 19 private final FileDescriptorInfo[] mFilesToBeMapped; |
| 20 private final LaunchCallback mLaunchCallback; |
| 21 private final IBinder mChildProcessCallback; |
| 22 private final boolean mInSandbox; |
| 23 private final boolean mAlwaysInForeground; |
| 24 private final ChildProcessCreationParams mCreationParams; |
| 25 |
| 26 ChildSpawnData(Context context, String[] commandLine, int childProcessId, |
| 27 FileDescriptorInfo[] filesToBeMapped, LaunchCallback launchCallback, |
| 28 IBinder childProcessCallback, boolean inSandbox, boolean alwaysInFor
eground, |
| 29 ChildProcessCreationParams creationParams) { |
| 30 mContext = context; |
| 31 mCommandLine = commandLine; |
| 32 mChildProcessId = childProcessId; |
| 33 mFilesToBeMapped = filesToBeMapped; |
| 34 mLaunchCallback = launchCallback; |
| 35 mChildProcessCallback = childProcessCallback; |
| 36 mInSandbox = inSandbox; |
| 37 mAlwaysInForeground = alwaysInForeground; |
| 38 mCreationParams = creationParams; |
| 39 } |
| 40 |
| 41 Context getContext() { |
| 42 return mContext; |
| 43 } |
| 44 |
| 45 String[] getCommandLine() { |
| 46 return mCommandLine; |
| 47 } |
| 48 |
| 49 int getChildProcessId() { |
| 50 return mChildProcessId; |
| 51 } |
| 52 |
| 53 FileDescriptorInfo[] getFilesToBeMapped() { |
| 54 return mFilesToBeMapped; |
| 55 } |
| 56 |
| 57 LaunchCallback getLaunchCallback() { |
| 58 return mLaunchCallback; |
| 59 } |
| 60 |
| 61 IBinder getChildProcessCallback() { |
| 62 return mChildProcessCallback; |
| 63 } |
| 64 |
| 65 boolean isInSandbox() { |
| 66 return mInSandbox; |
| 67 } |
| 68 |
| 69 boolean isAlwaysInForeground() { |
| 70 return mAlwaysInForeground; |
| 71 } |
| 72 |
| 73 ChildProcessCreationParams getCreationParams() { |
| 74 return mCreationParams; |
| 75 } |
| 76 } |
OLD | NEW |