| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |