Chromium Code Reviews| 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 6b9c483357e97732072fde0227d133cf98b375a6..6f18d6b9feb67a61e6cdfe823dfbd167e336b593 100644 |
| --- a/content/browser/android/child_process_launcher_android.cc |
| +++ b/content/browser/android/child_process_launcher_android.cc |
| @@ -13,7 +13,9 @@ |
| #include "base/android/context_utils.h" |
| #include "base/android/jni_android.h" |
| #include "base/android/jni_array.h" |
| +#include "base/android/jni_string.h" |
| #include "base/logging.h" |
| +#include "content/browser/android/scoped_surface_request_manager.h" |
| #include "content/browser/file_descriptor_info_impl.h" |
| #include "content/browser/frame_host/render_frame_host_impl.h" |
| #include "content/browser/media/android/browser_media_player_manager.h" |
| @@ -237,6 +239,20 @@ void EstablishSurfacePeer(JNIEnv* env, |
| &SetSurfacePeer, jsurface, pid, primary_id, secondary_id)); |
| } |
| +void CompleteScopedSurfaceRequest(JNIEnv* env, |
| + const JavaParamRef<jclass>& clazz, |
| + jlong request_token_high, |
| + jlong request_token_low, |
| + const JavaParamRef<jobject>& surface) { |
| + ScopedJavaGlobalRef<jobject> jsurface; |
| + jsurface.Reset(env, surface); |
| + gl::ScopedJavaSurface scoped_surface(jsurface); |
|
no sievers
2016/09/13 23:25:56
nit: Doesn't the ScopedJavaSurface constructor tak
tguilbert
2016/09/20 03:08:40
You are right. Leftover from previous iterations.
|
| + |
| + ScopedSurfaceRequestManager::GetInstance()->FulfillScopedSurfaceRequest( |
| + base::Nonce::Deserialize(request_token_high, request_token_low), |
| + std::move(scoped_surface)); |
| +} |
| + |
| void RegisterViewSurface(int surface_id, const JavaRef<jobject>& j_surface) { |
| JNIEnv* env = AttachCurrentThread(); |
| DCHECK(env); |