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 66513172f0fd9a69a273362afbbf387e3767f3ff..6bdbf3e9d841d759f8bc1d8456219397745af820 100644 |
--- a/content/app/android/child_process_service_impl.cc |
+++ b/content/app/android/child_process_service_impl.cc |
@@ -18,6 +18,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/android_overlay_provider_lookup.h" |
#include "gpu/ipc/common/android/scoped_surface_request_conduit.h" |
#include "gpu/ipc/common/android/surface_texture_peer.h" |
#include "gpu/ipc/common/gpu_surface_lookup.h" |
@@ -38,7 +39,8 @@ namespace { |
// we're in a renderer or gpu process. |
class ChildProcessSurfaceManager : public gpu::SurfaceTexturePeer, |
public gpu::ScopedSurfaceRequestConduit, |
- public gpu::GpuSurfaceLookup { |
+ public gpu::GpuSurfaceLookup, |
+ public gpu::AndroidOverlayProviderLookup { |
public: |
ChildProcessSurfaceManager() {} |
~ChildProcessSurfaceManager() override {} |
@@ -102,6 +104,14 @@ class ChildProcessSurfaceManager : public gpu::SurfaceTexturePeer, |
surface_id)); |
} |
+ // Overridden from AndroidOverlayProviderLookup: |
+ base::android::ScopedJavaLocalRef<jobject> GetAndroidOverlayProvider() |
+ override { |
+ JNIEnv* env = base::android::AttachCurrentThread(); |
+ return Java_ChildProcessServiceImpl_getAndroidOverlayProvider( |
+ env, service_impl_.obj()); |
+ } |
+ |
private: |
friend struct base::DefaultLazyInstanceTraits<ChildProcessSurfaceManager>; |
// The instance of org.chromium.content.app.ChildProcessServiceImpl. |
@@ -130,6 +140,8 @@ void InternalInitChildProcessImpl(JNIEnv* env, |
g_child_process_surface_manager.Pointer()); |
gpu::ScopedSurfaceRequestConduit::SetInstance( |
g_child_process_surface_manager.Pointer()); |
+ gpu::AndroidOverlayProviderLookup::InitInstance( |
+ g_child_process_surface_manager.Pointer()); |
base::android::MemoryPressureListenerAndroid::RegisterSystemCallback(env); |
} |