| 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/browser/android/child_process_launcher_android.h" | 5 #include "content/browser/android/child_process_launcher_android.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 gl::ScopedJavaSurface GetSurfaceTextureSurface(int surface_texture_id, | 274 gl::ScopedJavaSurface GetSurfaceTextureSurface(int surface_texture_id, |
| 275 int client_id) { | 275 int client_id) { |
| 276 JNIEnv* env = AttachCurrentThread(); | 276 JNIEnv* env = AttachCurrentThread(); |
| 277 DCHECK(env); | 277 DCHECK(env); |
| 278 return gl::ScopedJavaSurface::AcquireExternalSurface( | 278 return gl::ScopedJavaSurface::AcquireExternalSurface( |
| 279 Java_ChildProcessLauncher_getSurfaceTextureSurface( | 279 Java_ChildProcessLauncher_getSurfaceTextureSurface( |
| 280 env, surface_texture_id, client_id) | 280 env, surface_texture_id, client_id) |
| 281 .obj()); | 281 .obj()); |
| 282 } | 282 } |
| 283 | 283 |
| 284 gl::ScopedJavaSurface GetBrowserSurfaceTextureSurface(int surface_texture_id) { |
| 285 JNIEnv* env = AttachCurrentThread(); |
| 286 DCHECK(env); |
| 287 return gl::ScopedJavaSurface::AcquireExternalSurface( |
| 288 Java_ChildProcessLauncher_getBrowserSurfaceTextureSurface( |
| 289 env, surface_texture_id) |
| 290 .obj()); |
| 291 } |
| 292 |
| 284 jboolean IsSingleProcess(JNIEnv* env, const JavaParamRef<jclass>& clazz) { | 293 jboolean IsSingleProcess(JNIEnv* env, const JavaParamRef<jclass>& clazz) { |
| 285 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 294 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 286 switches::kSingleProcess); | 295 switches::kSingleProcess); |
| 287 } | 296 } |
| 288 | 297 |
| 289 bool RegisterChildProcessLauncher(JNIEnv* env) { | 298 bool RegisterChildProcessLauncher(JNIEnv* env) { |
| 290 return RegisterNativesImpl(env); | 299 return RegisterNativesImpl(env); |
| 291 } | 300 } |
| 292 | 301 |
| 293 } // namespace content | 302 } // namespace content |
| OLD | NEW |