Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(921)

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java

Issue 14622024: Define containers for more SandboxedProcessServices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Let ChildProcessLauncher know there are now 10, not 6. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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.content.Context; 7 import android.content.Context;
8 import android.util.Log; 8 import android.util.Log;
9 import android.view.Surface; 9 import android.view.Surface;
10 10
(...skipping 25 matching lines...) Expand all
36 private static final String SWITCH_PROCESS_TYPE = "type"; 36 private static final String SWITCH_PROCESS_TYPE = "type";
37 private static final String SWITCH_PPAPI_BROKER_PROCESS = "ppapi-broker"; 37 private static final String SWITCH_PPAPI_BROKER_PROCESS = "ppapi-broker";
38 private static final String SWITCH_RENDERER_PROCESS = "renderer"; 38 private static final String SWITCH_RENDERER_PROCESS = "renderer";
39 private static final String SWITCH_GPU_PROCESS = "gpu-process"; 39 private static final String SWITCH_GPU_PROCESS = "gpu-process";
40 40
41 // The upper limit on the number of simultaneous sandboxed and privileged ch ild service process 41 // The upper limit on the number of simultaneous sandboxed and privileged ch ild service process
42 // instances supported. Each limit must not exceed total number of Sandboxed ProcessServiceX 42 // instances supported. Each limit must not exceed total number of Sandboxed ProcessServiceX
43 // classes and PrivilegedProcessClassX declared in this package, and defined as services in the 43 // classes and PrivilegedProcessClassX declared in this package, and defined as services in the
44 // embedding application's manifest file. 44 // embedding application's manifest file.
45 // (See {@link ChildProcessService} for more details on defining the service s.) 45 // (See {@link ChildProcessService} for more details on defining the service s.)
46 /* package */ static final int MAX_REGISTERED_SANDBOXED_SERVICES = 6; 46 /* package */ static final int MAX_REGISTERED_SANDBOXED_SERVICES = 10;
47 /* package */ static final int MAX_REGISTERED_PRIVILEGED_SERVICES = 3; 47 /* package */ static final int MAX_REGISTERED_PRIVILEGED_SERVICES = 3;
48 48
49 private static class ChildConnectionAllocator { 49 private static class ChildConnectionAllocator {
50 private ChildProcessConnection[] mChildProcessConnections; 50 private ChildProcessConnection[] mChildProcessConnections;
51 51
52 // The list of free slots in corresponing Connections. When looking for a free connection, 52 // The list of free slots in corresponing Connections. When looking for a free connection,
53 // the first index in that list should be used. When a connection is fre ed, its index 53 // the first index in that list should be used. When a connection is fre ed, its index
54 // is added to the end of the list. This is so that we avoid immediately reusing a freed 54 // is added to the end of the list. This is so that we avoid immediately reusing a freed
55 // connection (see bug crbug.com/164069): the framework might keep a ser vice process alive 55 // connection (see bug crbug.com/164069): the framework might keep a ser vice process alive
56 // when it's been unbound for a short time. If a connection to that sam e service is bound 56 // when it's been unbound for a short time. If a connection to that sam e service is bound
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 return nativeGetViewSurface(surfaceId); 385 return nativeGetViewSurface(surfaceId);
386 } 386 }
387 }; 387 };
388 }; 388 };
389 389
390 private static native void nativeOnChildProcessStarted(int clientContext, in t pid); 390 private static native void nativeOnChildProcessStarted(int clientContext, in t pid);
391 private static native Surface nativeGetViewSurface(int surfaceId); 391 private static native Surface nativeGetViewSurface(int surfaceId);
392 private static native void nativeEstablishSurfacePeer( 392 private static native void nativeEstablishSurfacePeer(
393 int pid, Surface surface, int primaryID, int secondaryID); 393 int pid, Surface surface, int primaryID, int secondaryID);
394 } 394 }
OLDNEW
« no previous file with comments | « content/public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698