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

Unified Diff: content/child/child_thread_impl.cc

Issue 1248713002: ozone: ClientPixmapManager passes VGEM fd from browser to renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove redundant Pass() Created 5 years, 4 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
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/common/child_process_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_thread_impl.cc
diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc
index 3978af0b74a438b49b1758b62803fa11f0f28ca1..e720fa4869dd600377d2ae6cee0305923cd7f05b 100644
--- a/content/child/child_thread_impl.cc
+++ b/content/child/child_thread_impl.cc
@@ -68,6 +68,10 @@
#include "content/child/child_io_surface_manager_mac.h"
#endif
+#if defined(USE_OZONE)
+#include "ui/ozone/public/client_native_pixmap_factory.h"
+#endif
+
#if defined(OS_WIN)
#include "ipc/attachment_broker_unprivileged_win.h"
#endif
@@ -192,6 +196,31 @@ class IOSurfaceManagerFilter : public IPC::MessageFilter {
};
#endif
+#if defined(USE_OZONE)
+class ClientNativePixmapFactoryFilter : public IPC::MessageFilter {
+ public:
+ // Overridden from IPC::MessageFilter:
+ bool OnMessageReceived(const IPC::Message& message) override {
+ bool handled = true;
+ IPC_BEGIN_MESSAGE_MAP(ClientNativePixmapFactoryFilter, message)
+ IPC_MESSAGE_HANDLER(ChildProcessMsg_InitializeClientNativePixmapFactory,
+ OnInitializeClientNativePixmapFactory)
+ IPC_MESSAGE_UNHANDLED(handled = false)
+ IPC_END_MESSAGE_MAP()
+ return handled;
+ }
+
+ protected:
+ ~ClientNativePixmapFactoryFilter() override {}
+
+ void OnInitializeClientNativePixmapFactory(
+ const base::FileDescriptor& device_fd) {
+ ui::ClientNativePixmapFactory::GetInstance()->Initialize(
+ base::ScopedFD(device_fd.fd));
+ }
+};
+#endif
+
#if defined(OS_ANDROID)
// A class that allows for triggering a clean shutdown from another
// thread through draining the main thread's msg loop.
@@ -428,6 +457,10 @@ void ChildThreadImpl::Init(const Options& options) {
channel_->AddFilter(new IOSurfaceManagerFilter());
#endif
+#if defined(USE_OZONE)
+ channel_->AddFilter(new ClientNativePixmapFactoryFilter());
+#endif
+
// Add filters passed here via options.
for (auto startup_filter : options.startup_filters) {
channel_->AddFilter(startup_filter);
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/common/child_process_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698