OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 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 | 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 package org.chromium.content.browser; | 5 package org.chromium.content.browser; |
6 | 6 |
7 import android.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
8 import android.app.Service; | 8 import android.app.Service; |
9 import android.content.Context; | 9 import android.content.Context; |
10 import android.content.Intent; | 10 import android.content.Intent; |
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
972 Log.w(TAG, "%s, pid=%d", message, pid); | 972 Log.w(TAG, "%s, pid=%d", message, pid); |
973 } | 973 } |
974 } | 974 } |
975 | 975 |
976 @VisibleForTesting | 976 @VisibleForTesting |
977 static ChildProcessConnection allocateBoundConnectionForTesting(Context cont
ext, | 977 static ChildProcessConnection allocateBoundConnectionForTesting(Context cont
ext, |
978 ChildProcessCreationParams creationParams) { | 978 ChildProcessCreationParams creationParams) { |
979 return allocateBoundConnection(context, null, true, false, creationParam
s); | 979 return allocateBoundConnection(context, null, true, false, creationParam
s); |
980 } | 980 } |
981 | 981 |
| 982 @VisibleForTesting |
| 983 static ChildProcessConnection allocateConnectionForTesting(Context context, |
| 984 ChildProcessCreationParams creationParams) { |
| 985 return allocateConnection( |
| 986 context, true, getLinkerParamsForNewConnection(), false, creatio
nParams); |
| 987 } |
| 988 |
982 /** | 989 /** |
983 * Queue up a spawn requests for testing. | 990 * Queue up a spawn requests for testing. |
984 */ | 991 */ |
985 @VisibleForTesting | 992 @VisibleForTesting |
986 static void enqueuePendingSpawnForTesting(Context context, String[] commandL
ine, | 993 static void enqueuePendingSpawnForTesting(Context context, String[] commandL
ine, |
987 ChildProcessCreationParams creationParams, boolean inSandbox) { | 994 ChildProcessCreationParams creationParams, boolean inSandbox) { |
988 String packageName = creationParams != null ? creationParams.getPackageN
ame() | 995 String packageName = creationParams != null ? creationParams.getPackageN
ame() |
989 : context.getPackageName(); | 996 : context.getPackageName(); |
990 PendingSpawnQueue pendingSpawnQueue = getPendingSpawnQueue(context, | 997 PendingSpawnQueue pendingSpawnQueue = getPendingSpawnQueue(context, |
991 packageName, inSandbox); | 998 packageName, inSandbox); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1043 } | 1050 } |
1044 | 1051 |
1045 return true; | 1052 return true; |
1046 } | 1053 } |
1047 | 1054 |
1048 private static native void nativeOnChildProcessStarted(long clientContext, i
nt pid); | 1055 private static native void nativeOnChildProcessStarted(long clientContext, i
nt pid); |
1049 private static native void nativeEstablishSurfacePeer( | 1056 private static native void nativeEstablishSurfacePeer( |
1050 int pid, Surface surface, int primaryID, int secondaryID); | 1057 int pid, Surface surface, int primaryID, int secondaryID); |
1051 private static native boolean nativeIsSingleProcess(); | 1058 private static native boolean nativeIsSingleProcess(); |
1052 } | 1059 } |
OLD | NEW |