OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #include "content/browser/child_process_launcher_helper_android.h" | 5 #include "content/browser/child_process_launcher_helper_android.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/android/apk_assets.h" | 9 #include "base/android/apk_assets.h" |
10 #include "base/android/context_utils.h" | 10 #include "base/android/context_utils.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 JNIEnv* env = AttachCurrentThread(); | 51 JNIEnv* env = AttachCurrentThread(); |
52 DCHECK(env); | 52 DCHECK(env); |
53 | 53 |
54 // Create the Command line String[] | 54 // Create the Command line String[] |
55 ScopedJavaLocalRef<jobjectArray> j_argv = ToJavaArrayOfStrings(env, argv); | 55 ScopedJavaLocalRef<jobjectArray> j_argv = ToJavaArrayOfStrings(env, argv); |
56 | 56 |
57 size_t file_count = files_to_register->GetMappingSize(); | 57 size_t file_count = files_to_register->GetMappingSize(); |
58 DCHECK(file_count > 0); | 58 DCHECK(file_count > 0); |
59 | 59 |
60 ScopedJavaLocalRef<jclass> j_file_info_class = base::android::GetClass( | 60 ScopedJavaLocalRef<jclass> j_file_info_class = base::android::GetClass( |
61 env, "org/chromium/content/common/FileDescriptorInfo"); | 61 env, "org/chromium/base/process_launcher/FileDescriptorInfo"); |
62 ScopedJavaLocalRef<jobjectArray> j_file_infos( | 62 ScopedJavaLocalRef<jobjectArray> j_file_infos( |
63 env, env->NewObjectArray(file_count, j_file_info_class.obj(), NULL)); | 63 env, env->NewObjectArray(file_count, j_file_info_class.obj(), NULL)); |
64 base::android::CheckException(env); | 64 base::android::CheckException(env); |
65 | 65 |
66 for (size_t i = 0; i < file_count; ++i) { | 66 for (size_t i = 0; i < file_count; ++i) { |
67 int fd = files_to_register->GetFDAt(i); | 67 int fd = files_to_register->GetFDAt(i); |
68 PCHECK(0 <= fd); | 68 PCHECK(0 <= fd); |
69 int id = files_to_register->GetIDAt(i); | 69 int id = files_to_register->GetIDAt(i); |
70 const auto& region = files_to_register->GetRegionAt(i); | 70 const auto& region = files_to_register->GetRegionAt(i); |
71 bool auto_close = files_to_register->OwnsFD(fd); | 71 bool auto_close = files_to_register->OwnsFD(fd); |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 gl::ScopedJavaSurface surface_view = | 316 gl::ScopedJavaSurface surface_view = |
317 gpu::GpuSurfaceTracker::GetInstance()->AcquireJavaSurface(surface_id); | 317 gpu::GpuSurfaceTracker::GetInstance()->AcquireJavaSurface(surface_id); |
318 return base::android::ScopedJavaLocalRef<jobject>(surface_view.j_surface()); | 318 return base::android::ScopedJavaLocalRef<jobject>(surface_view.j_surface()); |
319 } | 319 } |
320 | 320 |
321 bool RegisterChildProcessLauncher(JNIEnv* env) { | 321 bool RegisterChildProcessLauncher(JNIEnv* env) { |
322 return RegisterNativesImpl(env); | 322 return RegisterNativesImpl(env); |
323 } | 323 } |
324 | 324 |
325 } // namespace content | 325 } // namespace content |
OLD | NEW |