| Index: content/browser/android/child_process_launcher_android.cc
|
| diff --git a/content/browser/android/child_process_launcher_android.cc b/content/browser/android/child_process_launcher_android.cc
|
| index cf915e4a42a837de1f7a824c63964e205cbbbe4f..b1047f63ae71a4758d9b289d3c5a93113ae13ef2 100644
|
| --- a/content/browser/android/child_process_launcher_android.cc
|
| +++ b/content/browser/android/child_process_launcher_android.cc
|
| @@ -81,6 +81,7 @@ static void OnChildProcessStarted(JNIEnv*,
|
|
|
| void StartChildProcess(
|
| const CommandLine::StringVector& argv,
|
| + int child_process_id,
|
| const std::vector<content::FileDescriptorInfo>& files_to_register,
|
| const StartChildProcessCallback& callback) {
|
| JNIEnv* env = AttachCurrentThread();
|
| @@ -119,6 +120,7 @@ void StartChildProcess(
|
| Java_ChildProcessLauncher_start(env,
|
| base::android::GetApplicationContext(),
|
| j_argv.obj(),
|
| + child_process_id,
|
| j_file_ids.obj(),
|
| j_file_fds.obj(),
|
| j_file_auto_close.obj(),
|
| @@ -159,6 +161,17 @@ jobject GetViewSurface(JNIEnv* env, jclass clazz, jint surface_id) {
|
| return CompositorImpl::GetSurface(surface_id);
|
| }
|
|
|
| +jobject GetSurfaceTextureSurface(JNIEnv* env,
|
| + jclass clazz,
|
| + jint primary_id,
|
| + jint secondary_id) {
|
| + // This is a synchronous call from a renderer process and is expected to be
|
| + // handled on a binder thread. Handling this on the UI thread will lead
|
| + // to deadlocks.
|
| + DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + return CompositorImpl::GetSurfaceTextureSurface(primary_id, secondary_id);
|
| +}
|
| +
|
| jboolean IsSingleProcess(JNIEnv* env, jclass clazz) {
|
| return CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess);
|
| }
|
|
|