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_impl.h" | 5 #include "content/app/android/child_process_service_impl.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" |
11 #include "base/android/library_loader/library_loader_hooks.h" | 11 #include "base/android/library_loader/library_loader_hooks.h" |
12 #include "base/android/memory_pressure_listener_android.h" | 12 #include "base/android/memory_pressure_listener_android.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/posix/global_descriptors.h" | 15 #include "base/posix/global_descriptors.h" |
16 #include "content/child/child_thread_impl.h" | 16 #include "content/child/child_thread_impl.h" |
17 #include "content/public/common/content_descriptors.h" | 17 #include "content/public/common/content_descriptors.h" |
18 #include "gpu/ipc/common/android/surface_texture_manager.h" | 18 #include "gpu/ipc/common/android/surface_texture_manager.h" |
19 #include "gpu/ipc/common/android/surface_texture_peer.h" | 19 #include "gpu/ipc/common/android/surface_texture_peer.h" |
20 #include "gpu/ipc/common/gpu_surface_lookup.h" | 20 #include "gpu/ipc/common/gpu_surface_lookup.h" |
21 #include "ipc/ipc_descriptors.h" | 21 #include "ipc/ipc_descriptors.h" |
22 #include "jni/ChildProcessServiceImpl_jni.h" | 22 #include "jni/ChildProcessServiceImpl_jni.h" |
23 #include "ui/gl/android/scoped_java_surface.h" | 23 #include "ui/gl/android/scoped_java_surface.h" |
24 | 24 |
25 using base::android::AttachCurrentThread; | 25 using base::android::AttachCurrentThread; |
26 using base::android::CheckException; | 26 using base::android::CheckException; |
27 using base::android::JavaIntArrayToIntVector; | 27 using base::android::JavaIntArrayToIntVector; |
| 28 using base::android::JavaParamRef; |
28 | 29 |
29 namespace content { | 30 namespace content { |
30 | 31 |
31 namespace { | 32 namespace { |
32 | 33 |
33 // TODO(sievers): Use two different implementations of this depending on if | 34 // TODO(sievers): Use two different implementations of this depending on if |
34 // we're in a renderer or gpu process. | 35 // we're in a renderer or gpu process. |
35 class SurfaceTextureManagerImpl : public gpu::SurfaceTextureManager, | 36 class SurfaceTextureManagerImpl : public gpu::SurfaceTextureManager, |
36 public gpu::SurfaceTexturePeer, | 37 public gpu::SurfaceTexturePeer, |
37 public gpu::GpuSurfaceLookup { | 38 public gpu::GpuSurfaceLookup { |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 | 181 |
181 bool RegisterChildProcessServiceImpl(JNIEnv* env) { | 182 bool RegisterChildProcessServiceImpl(JNIEnv* env) { |
182 return RegisterNativesImpl(env); | 183 return RegisterNativesImpl(env); |
183 } | 184 } |
184 | 185 |
185 void ShutdownMainThread(JNIEnv* env, const JavaParamRef<jobject>& obj) { | 186 void ShutdownMainThread(JNIEnv* env, const JavaParamRef<jobject>& obj) { |
186 ChildThreadImpl::ShutdownThread(); | 187 ChildThreadImpl::ShutdownThread(); |
187 } | 188 } |
188 | 189 |
189 } // namespace content | 190 } // namespace content |
OLD | NEW |