Index: content/app/android/child_process_service_impl.cc |
diff --git a/content/app/android/child_process_service_impl.cc b/content/app/android/child_process_service_impl.cc |
index 551efe94278b64d6c4d6a50e9fed8586f91c3661..b888e6130b620d985c0c85e9a8e226e8f654f911 100644 |
--- a/content/app/android/child_process_service_impl.cc |
+++ b/content/app/android/child_process_service_impl.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/ChildProcessServiceImpl_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 impl| is the instance of |
// org.chromium.content.app.ChildProcessServiceImpl. |
@@ -43,10 +45,12 @@ class SurfaceTextureManagerImpl : public gpu::SurfaceTextureManager, |
: service_impl_(service_impl) { |
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, |
env, service_impl_.obj(), surface_id)); |
} |
+ // Overridden from DialogSurfaceLookup: |
+ base::android::ScopedJavaLocalRef<jobject> GetDialogSurfaceManager() |
+ override { |
+ JNIEnv* env = base::android::AttachCurrentThread(); |
+ return base::android::ScopedJavaLocalRef<jobject>( |
+ content::Java_ChildProcessServiceImpl_getDialogSurfaceManager( |
+ env, service_impl_.obj())); |
+ } |
+ |
private: |
// The instance of org.chromium.content.app.ChildProcessServiceImpl. |
base::android::ScopedJavaGlobalRef<jobject> service_impl_; |