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

Side by Side Diff: content/test/test_native_pixmap_manager_ozone.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: rebase to lastest crrev.com/1128113011 Created 5 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 unified diff | Download patch
« no previous file with comments | « content/test/test_native_pixmap_manager_ozone.h ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/test/test_native_pixmap_manager_ozone.h"
6
7 #include "base/file_descriptor_posix.h"
8 #include "base/memory/singleton.h"
9 #include "ui/ozone/public/ozone_platform.h"
10
11 namespace content {
12
13 struct TestNativePixmapManagerTrait
14 : public DefaultSingletonTraits<TestNativePixmapManager> {
15 static TestNativePixmapManager* New() {
16 TestNativePixmapManager* manager = new TestNativePixmapManager();
17 manager->Initialize(ui::OzonePlatform::GetInstance()->GetVirtualDeviceFd());
18 return manager;
19 }
20 };
21
22 // static
23 TestNativePixmapManager* TestNativePixmapManager::GetInstance() {
24 return Singleton<TestNativePixmapManager,
25 TestNativePixmapManagerTrait>::get();
26 }
27
28 TestNativePixmapManager::TestNativePixmapManager() {}
29
30 TestNativePixmapManager::~TestNativePixmapManager() {}
31
32 void TestNativePixmapManager::Initialize(
33 const base::FileDescriptor& device_fd) {
34 pixmap_manager_ = ui::NativePixmapManager::Create(device_fd);
35 }
36
37 std::vector<ui::NativePixmapManager::Configuration>
38 TestNativePixmapManager::GetSupportedNativePixmapConfigurations() const {
39 return pixmap_manager_->GetSupportedNativePixmapConfigurations();
40 }
41
42 } // namespace content
OLDNEW
« no previous file with comments | « content/test/test_native_pixmap_manager_ozone.h ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698