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

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

Issue 2178973004: DialogSurfaceManager implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gyp Created 4 years, 5 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_impl.cc
diff --git a/content/app/android/child_process_service_impl.cc b/content/app/android/child_process_service_impl.cc
index 551efe94278b64d6c4d6a50e9fed8586f91c3661..c28d6178c1b920776b17ef3122c442d32e1b8fa1 100644
--- a/content/app/android/child_process_service_impl.cc
+++ b/content/app/android/child_process_service_impl.cc
@@ -15,6 +15,7 @@
#include "base/posix/global_descriptors.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/surface_texture_manager.h"
#include "gpu/ipc/common/android/surface_texture_peer.h"
#include "gpu/ipc/common/gpu_surface_lookup.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_;

Powered by Google App Engine
This is Rietveld 408576698