Index: content/browser/gpu/browser_client_native_pixmap_manager_ozone.h |
diff --git a/content/browser/gpu/browser_client_native_pixmap_manager_ozone.h b/content/browser/gpu/browser_client_native_pixmap_manager_ozone.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..83fa3f73acda562825ec748181aa484627587a16 |
--- /dev/null |
+++ b/content/browser/gpu/browser_client_native_pixmap_manager_ozone.h |
@@ -0,0 +1,45 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_BROWSER_GPU_BROWSER_CLIENT_NATIVE_PIXMAP_MANAGER_OZONE_H_ |
+#define CONTENT_BROWSER_GPU_BROWSER_CLIENT_NATIVE_PIXMAP_MANAGER_OZONE_H_ |
+ |
+#include "base/file_descriptor_posix.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "ipc/ipc_sender.h" |
+#include "ui/ozone/public/client_native_pixmap_manager.h" |
+ |
+namespace content { |
+ |
+class BrowserClientNativePixmapManager : public ui::ClientNativePixmapManager { |
+ public: |
+ static BrowserClientNativePixmapManager* GetInstance(); |
+ ~BrowserClientNativePixmapManager() override; |
+ |
+ // Send virtual device file descriptor to child process. |
+ void SendVirtualDevice(IPC::Sender* sender); |
+ |
+ // ui::ClientNativePixmapManager: |
+ std::vector<Configuration> GetSupportedConfigurations() const override; |
+ scoped_ptr<ui::ClientNativePixmap> ImportClientNativePixmap( |
+ base::FileDescriptor handle, |
+ gfx::Size size, |
+ ui::NativePixmapFormat format, |
+ ui::NativePixmapUsage usage) override; |
+ |
+ private: |
+ friend struct BrowserClientNativePixmapManagerTrait; |
+ BrowserClientNativePixmapManager(); |
+ |
+ void Initialize(const base::FileDescriptor& virtual_device) override; |
+ |
+ scoped_ptr<ui::ClientNativePixmapManager> pixmap_manager_; |
+ base::FileDescriptor virtual_device_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(BrowserClientNativePixmapManager); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_BROWSER_GPU_BROWSER_CLIENT_NATIVE_PIXMAP_MANAGER_OZONE_H_ |