Chromium Code Reviews

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

Issue 58203002: Android: remove ContentViewCore from the renderer crash codepath. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Yaron's comments. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
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.content.Context; 7 import android.content.Context;
8 import android.util.Log; 8 import android.util.Log;
9 import android.util.SparseIntArray; 9 import android.util.SparseIntArray;
10 import android.view.Surface; 10 import android.view.Surface;
(...skipping 375 matching lines...)
386 } 386 }
387 } 387 }
388 } 388 }
389 389
390 private static BindingManager sBindingManager = new BindingManager(); 390 private static BindingManager sBindingManager = new BindingManager();
391 391
392 static BindingManager getBindingManager() { 392 static BindingManager getBindingManager() {
393 return sBindingManager; 393 return sBindingManager;
394 } 394 }
395 395
396 @CalledByNative
397 private static boolean isOomProtected(int pid) {
398 return sBindingManager.isOomProtected(pid);
399 }
400
396 /** 401 /**
397 * Returns the child process service interface for the given pid. This may b e called on 402 * Returns the child process service interface for the given pid. This may b e called on
398 * any thread, but the caller must assume that the service can disconnect at any time. All 403 * any thread, but the caller must assume that the service can disconnect at any time. All
399 * service calls should catch and handle android.os.RemoteException. 404 * service calls should catch and handle android.os.RemoteException.
400 * 405 *
401 * @param pid The pid (process handle) of the service obtained from {@link # start}. 406 * @param pid The pid (process handle) of the service obtained from {@link # start}.
402 * @return The IChildProcessService or null if the service no longer exists. 407 * @return The IChildProcessService or null if the service no longer exists.
403 */ 408 */
404 public static IChildProcessService getChildService(int pid) { 409 public static IChildProcessService getChildService(int pid) {
405 ChildProcessConnection connection = sServiceMap.get(pid); 410 ChildProcessConnection connection = sServiceMap.get(pid);
(...skipping 175 matching lines...)
581 Log.w(TAG, message + ", pid=" + pid); 586 Log.w(TAG, message + ", pid=" + pid);
582 } 587 }
583 } 588 }
584 589
585 private static native void nativeOnChildProcessStarted(int clientContext, in t pid); 590 private static native void nativeOnChildProcessStarted(int clientContext, in t pid);
586 private static native Surface nativeGetViewSurface(int surfaceId); 591 private static native Surface nativeGetViewSurface(int surfaceId);
587 private static native void nativeEstablishSurfacePeer( 592 private static native void nativeEstablishSurfacePeer(
588 int pid, Surface surface, int primaryID, int secondaryID); 593 int pid, Surface surface, int primaryID, int secondaryID);
589 private static native boolean nativeIsSingleProcess(); 594 private static native boolean nativeIsSingleProcess();
590 } 595 }
OLDNEW

Powered by Google App Engine