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

Side by Side Diff: ui/ozone/platform/headless/ozone_platform_headless.cc

Issue 1262043002: Implement DRM Native Pixmap using prime buffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new-master
Patch Set: remove drm header Created 4 years, 9 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/ozone/platform/headless/ozone_platform_headless.h" 5 #include "ui/ozone/platform/headless/ozone_platform_headless.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" 10 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 scoped_ptr<PlatformWindow> CreatePlatformWindow( 72 scoped_ptr<PlatformWindow> CreatePlatformWindow(
73 PlatformWindowDelegate* delegate, 73 PlatformWindowDelegate* delegate,
74 const gfx::Rect& bounds) override { 74 const gfx::Rect& bounds) override {
75 return make_scoped_ptr<PlatformWindow>( 75 return make_scoped_ptr<PlatformWindow>(
76 new HeadlessWindow(delegate, window_manager_.get(), bounds)); 76 new HeadlessWindow(delegate, window_manager_.get(), bounds));
77 } 77 }
78 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { 78 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override {
79 return make_scoped_ptr(new NativeDisplayDelegateOzone()); 79 return make_scoped_ptr(new NativeDisplayDelegateOzone());
80 } 80 }
81 base::ScopedFD OpenClientNativePixmapDevice() const override {
82 return base::ScopedFD();
83 }
84 81
85 void InitializeUI() override { 82 void InitializeUI() override {
86 window_manager_.reset(new HeadlessWindowManager(file_path_)); 83 window_manager_.reset(new HeadlessWindowManager(file_path_));
87 window_manager_->Initialize(); 84 window_manager_->Initialize();
88 surface_factory_.reset(new HeadlessSurfaceFactory(window_manager_.get())); 85 surface_factory_.reset(new HeadlessSurfaceFactory(window_manager_.get()));
89 // This unbreaks tests that create their own. 86 // This unbreaks tests that create their own.
90 if (!PlatformEventSource::GetInstance()) 87 if (!PlatformEventSource::GetInstance())
91 platform_event_source_.reset(new HeadlessPlatformEventSource); 88 platform_event_source_.reset(new HeadlessPlatformEventSource);
92 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( 89 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(
93 make_scoped_ptr(new StubKeyboardLayoutEngine())); 90 make_scoped_ptr(new StubKeyboardLayoutEngine()));
(...skipping 28 matching lines...) Expand all
122 119
123 OzonePlatform* CreateOzonePlatformHeadless() { 120 OzonePlatform* CreateOzonePlatformHeadless() {
124 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); 121 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
125 base::FilePath location; 122 base::FilePath location;
126 if (cmd->HasSwitch(switches::kOzoneDumpFile)) 123 if (cmd->HasSwitch(switches::kOzoneDumpFile))
127 location = cmd->GetSwitchValuePath(switches::kOzoneDumpFile); 124 location = cmd->GetSwitchValuePath(switches::kOzoneDumpFile);
128 return new OzonePlatformHeadless(location); 125 return new OzonePlatformHeadless(location);
129 } 126 }
130 127
131 } // namespace ui 128 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/egltest/ozone_platform_egltest.cc ('k') | ui/ozone/platform/wayland/ozone_platform_wayland.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698