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