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 083c3209a62c0107afde08c80aaefcb7c9e9889e..aa2615ee937733197993e3173826ae3f0539146c 100644 |
--- a/content/app/android/child_process_service_impl.cc |
+++ b/content/app/android/child_process_service_impl.cc |
@@ -16,6 +16,7 @@ |
#include "base/unguessable_token.h" |
#include "content/child/child_thread_impl.h" |
#include "content/public/common/content_descriptors.h" |
+#include "gpu/ipc/common/android/dialog_surface_lookup.h" |
#include "gpu/ipc/common/android/scoped_surface_request_conduit.h" |
#include "gpu/ipc/common/android/surface_texture_manager.h" |
#include "gpu/ipc/common/android/surface_texture_peer.h" |
@@ -38,7 +39,8 @@ namespace { |
class SurfaceTextureManagerImpl : public gpu::SurfaceTextureManager, |
public gpu::SurfaceTexturePeer, |
public gpu::ScopedSurfaceRequestConduit, |
- public gpu::GpuSurfaceLookup { |
+ public gpu::GpuSurfaceLookup, |
+ public gpu::DialogSurfaceLookup { |
public: |
// |service impl| is the instance of |
// org.chromium.content.app.ChildProcessServiceImpl. |
@@ -48,11 +50,13 @@ class SurfaceTextureManagerImpl : public gpu::SurfaceTextureManager, |
SurfaceTexturePeer::InitInstance(this); |
gpu::GpuSurfaceLookup::InitInstance(this); |
gpu::ScopedSurfaceRequestConduit::SetInstance(this); |
+ gpu::DialogSurfaceLookup::InitInstance(this); |
} |
~SurfaceTextureManagerImpl() override { |
SurfaceTexturePeer::InitInstance(NULL); |
gpu::GpuSurfaceLookup::InitInstance(NULL); |
gpu::ScopedSurfaceRequestConduit::SetInstance(nullptr); |
+ gpu::DialogSurfaceLookup::InitInstance(NULL); |
boliu
2016/11/14 16:39:24
nit: new code still prefers nullptr
liberato (no reviews please)
2016/12/20 17:16:38
Done.
|
} |
// Overridden from SurfaceTextureManager: |
@@ -143,6 +147,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_ChildProcessServiceImpl_getDialogSurfaceManager( |
boliu
2016/11/14 16:39:24
nit: content:: part not ncessary, also I think exp
liberato (no reviews please)
2016/12/20 17:16:38
Done.
|
+ env, service_impl_.obj())); |
+ } |
+ |
private: |
// The instance of org.chromium.content.app.ChildProcessServiceImpl. |
base::android::ScopedJavaGlobalRef<jobject> service_impl_; |