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

Unified Diff: content/app/android/child_process_service.cc

Issue 1967553002: DO NOT COMMIT - DialogSurface initial implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added check for gpu process for dialog surface manager. Created 4 years, 6 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
Index: content/app/android/child_process_service.cc
diff --git a/content/app/android/child_process_service.cc b/content/app/android/child_process_service.cc
index 861b6d9a2e8136cf0e812e8d29a7ef8d2e4b5297..15c1ea58cc0add1d30ae5a260826c2ca168f01d9 100644
--- a/content/app/android/child_process_service.cc
+++ b/content/app/android/child_process_service.cc
@@ -17,6 +17,7 @@
#include "content/public/common/content_descriptors.h"
#include "gpu/ipc/common/android/surface_texture_manager.h"
#include "gpu/ipc/common/android/surface_texture_peer.h"
+#include "gpu/ipc/common/dialog_surface_lookup.h"
#include "gpu/ipc/common/gpu_surface_lookup.h"
#include "ipc/ipc_descriptors.h"
#include "jni/ChildProcessService_jni.h"
@@ -34,7 +35,8 @@ namespace {
// we're in a renderer or gpu process.
class SurfaceTextureManagerImpl : public gpu::SurfaceTextureManager,
public gpu::SurfaceTexturePeer,
- public gpu::GpuSurfaceLookup {
+ public gpu::GpuSurfaceLookup,
+ public gpu::DialogSurfaceLookup {
public:
// |service| is the instance of
// org.chromium.content.app.ChildProcessService.
@@ -43,10 +45,12 @@ class SurfaceTextureManagerImpl : public gpu::SurfaceTextureManager,
: service_(service) {
SurfaceTexturePeer::InitInstance(this);
gpu::GpuSurfaceLookup::InitInstance(this);
+ gpu::DialogSurfaceLookup::InitInstance(this);
}
~SurfaceTextureManagerImpl() override {
SurfaceTexturePeer::InitInstance(NULL);
gpu::GpuSurfaceLookup::InitInstance(NULL);
+ gpu::DialogSurfaceLookup::InitInstance(NULL);
}
// Overridden from SurfaceTextureManager:
@@ -131,6 +135,15 @@ class SurfaceTextureManagerImpl : public gpu::SurfaceTextureManager,
surface_id));
}
+ // Overridden from DialogSurfaceLookup:
+ base::android::ScopedJavaLocalRef<jobject> GetDialogSurfaceManager()
+ override {
+ JNIEnv* env = base::android::AttachCurrentThread();
+ return base::android::ScopedJavaLocalRef<jobject>(
+ content::Java_ChildProcessService_getDialogSurfaceManager(
+ env, service_.obj()));
+ }
+
private:
// The instance of org.chromium.content.app.ChildProcessService.
base::android::ScopedJavaGlobalRef<jobject> service_;

Powered by Google App Engine
This is Rietveld 408576698