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 #include "content/app/android/child_process_service.h" | 5 #include "content/app/android/child_process_service.h" |
6 | 6 |
7 #include <android/native_window_jni.h> | 7 #include <android/native_window_jni.h> |
8 #include <cpu-features.h> | 8 #include <cpu-features.h> |
9 | 9 |
10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 143 |
144 // Set the CPU properties. | 144 // Set the CPU properties. |
145 android_setCpu(cpu_count, cpu_features); | 145 android_setCpu(cpu_count, cpu_features); |
146 // Register the file descriptors. | 146 // Register the file descriptors. |
147 // This includes the IPC channel, the crash dump signals and resource related | 147 // This includes the IPC channel, the crash dump signals and resource related |
148 // files. | 148 // files. |
149 DCHECK(file_fds.size() == file_ids.size()); | 149 DCHECK(file_fds.size() == file_ids.size()); |
150 for (size_t i = 0; i < file_ids.size(); ++i) | 150 for (size_t i = 0; i < file_ids.size(); ++i) |
151 base::GlobalDescriptors::GetInstance()->Set(file_ids[i], file_fds[i]); | 151 base::GlobalDescriptors::GetInstance()->Set(file_ids[i], file_fds[i]); |
152 | 152 |
153 SurfaceTextureManager::InitInstance(new SurfaceTextureManagerImpl(service)); | 153 SurfaceTextureManager::SetInstance(new SurfaceTextureManagerImpl(service)); |
154 | 154 |
155 base::android::MemoryPressureListenerAndroid::RegisterSystemCallback(env); | 155 base::android::MemoryPressureListenerAndroid::RegisterSystemCallback(env); |
156 } | 156 } |
157 | 157 |
158 } // namespace <anonymous> | 158 } // namespace <anonymous> |
159 | 159 |
160 void InitChildProcess(JNIEnv* env, | 160 void InitChildProcess(JNIEnv* env, |
161 jclass clazz, | 161 jclass clazz, |
162 jobject context, | 162 jobject context, |
163 jobject service, | 163 jobject service, |
(...skipping 19 matching lines...) Expand all Loading... |
183 | 183 |
184 bool RegisterChildProcessService(JNIEnv* env) { | 184 bool RegisterChildProcessService(JNIEnv* env) { |
185 return RegisterNativesImpl(env); | 185 return RegisterNativesImpl(env); |
186 } | 186 } |
187 | 187 |
188 void ShutdownMainThread(JNIEnv* env, jobject obj) { | 188 void ShutdownMainThread(JNIEnv* env, jobject obj) { |
189 ChildThreadImpl::ShutdownThread(); | 189 ChildThreadImpl::ShutdownThread(); |
190 } | 190 } |
191 | 191 |
192 } // namespace content | 192 } // namespace content |
OLD | NEW |