Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9211)

Unified Diff: content/browser/child_process_launcher_helper_android.cc

Issue 2760093002: Making callbacks in Android ChildProcessLauncher generic. (Closed)
Patch Set: Synced Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/android/gpu_process_callback.cc ('k') | content/public/android/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/child_process_launcher_helper_android.cc
diff --git a/content/browser/child_process_launcher_helper_android.cc b/content/browser/child_process_launcher_helper_android.cc
index d46d1cf9013ecb6cbda80c55582e3c9928f913bd..233b2ef7d6702ff1c5166f645aa4c33de719acd8 100644
--- a/content/browser/child_process_launcher_helper_android.cc
+++ b/content/browser/child_process_launcher_helper_android.cc
@@ -9,11 +9,9 @@
#include "base/android/apk_assets.h"
#include "base/android/context_utils.h"
#include "base/android/jni_array.h"
-#include "base/android/unguessable_token_android.h"
#include "base/i18n/icu_util.h"
#include "base/logging.h"
#include "base/metrics/field_trial.h"
-#include "content/browser/android/scoped_surface_request_manager.h"
#include "content/browser/child_process_launcher_helper.h"
#include "content/browser/child_process_launcher_helper_posix.h"
#include "content/browser/file_descriptor_info_impl.h"
@@ -23,7 +21,6 @@
#include "content/public/common/content_descriptors.h"
#include "content/public/common/content_switches.h"
#include "gin/v8_initializer.h"
-#include "gpu/ipc/common/gpu_surface_tracker.h"
#include "jni/ChildProcessLauncher_jni.h"
using base::android::AttachCurrentThread;
@@ -284,40 +281,11 @@ static void OnChildProcessStarted(JNIEnv*,
delete callback;
}
-void CompleteScopedSurfaceRequest(JNIEnv* env,
- const JavaParamRef<jclass>& clazz,
- const JavaParamRef<jobject>& token,
- const JavaParamRef<jobject>& surface) {
- base::UnguessableToken requestToken =
- base::android::UnguessableTokenAndroid::FromJavaUnguessableToken(env,
- token);
- if (!requestToken) {
- DLOG(ERROR) << "Received invalid surface request token.";
- return;
- }
-
- DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI));
-
- ScopedJavaGlobalRef<jobject> jsurface;
- jsurface.Reset(env, surface);
- ScopedSurfaceRequestManager::GetInstance()->FulfillScopedSurfaceRequest(
- requestToken, gl::ScopedJavaSurface(jsurface));
-}
-
jboolean IsSingleProcess(JNIEnv* env, const JavaParamRef<jclass>& clazz) {
return base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSingleProcess);
}
-base::android::ScopedJavaLocalRef<jobject> GetViewSurface(
- JNIEnv* env,
- const base::android::JavaParamRef<jclass>& jcaller,
- jint surface_id) {
- gl::ScopedJavaSurface surface_view =
- gpu::GpuSurfaceTracker::GetInstance()->AcquireJavaSurface(surface_id);
- return base::android::ScopedJavaLocalRef<jobject>(surface_view.j_surface());
-}
-
bool RegisterChildProcessLauncher(JNIEnv* env) {
return RegisterNativesImpl(env);
}
« no previous file with comments | « content/browser/android/gpu_process_callback.cc ('k') | content/public/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698