Index: content/child/child_native_pixmap_manager_ozone.cc |
diff --git a/content/child/child_native_pixmap_manager_ozone.cc b/content/child/child_native_pixmap_manager_ozone.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..dff1daade44a86787d53aa7ee60a29e7b95cce5c |
--- /dev/null |
+++ b/content/child/child_native_pixmap_manager_ozone.cc |
@@ -0,0 +1,41 @@ |
+// 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. |
+ |
+#include "content/child/child_native_pixmap_manager_ozone.h" |
+ |
+#include "base/file_descriptor_posix.h" |
+#include "base/memory/singleton.h" |
+ |
+namespace content { |
+ |
+struct ChildNativePixmapManagerTrait |
+ : public DefaultSingletonTraits<ChildNativePixmapManager> { |
+ static ChildNativePixmapManager* New() { |
+ ChildNativePixmapManager* manager = new ChildNativePixmapManager(); |
+ manager->Initialize(base::FileDescriptor()); |
+ return manager; |
+ } |
+}; |
+ |
+// static |
+ChildNativePixmapManager* ChildNativePixmapManager::GetInstance() { |
+ return Singleton<ChildNativePixmapManager, |
+ ChildNativePixmapManagerTrait>::get(); |
+} |
+ |
+ChildNativePixmapManager::ChildNativePixmapManager() {} |
+ |
+ChildNativePixmapManager::~ChildNativePixmapManager() {} |
+ |
+void ChildNativePixmapManager::Initialize( |
+ const base::FileDescriptor& device_fd) { |
+ pixmap_manager_ = ui::NativePixmapManager::Create(device_fd); |
+} |
+ |
+std::vector<ui::NativePixmapManager::Configuration> |
+ChildNativePixmapManager::GetSupportedNativePixmapConfigurations() const { |
+ return pixmap_manager_->GetSupportedNativePixmapConfigurations(); |
+} |
+ |
+} // namespace content |