1 // Copyright (c) 2015 Samsung Electronics. 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.
5 #include "ui/ozone/ozone_platform_efl.h"
7 #include "base/logging.h"
8 #include "ui/display/types/native_display_delegate.h"
9 #include "ui/ozone/common/stub_overlay_manager.h"
10 #include "ui/ozone/public/gpu_platform_support.h"
11 #include "ui/ozone/public/gpu_platform_support_host.h"
12 #include "ui/ozone/public/system_input_injector.h"
13 #include "ui/ozone/surface_factory_efl.h"
14 #include "ui/platform_window/platform_window.h"
18 OzonePlatformEfl::OzonePlatformEfl()
19 : surface_factory_(new SurfaceFactoryEfl) {
22 SurfaceFactoryOzone* OzonePlatformEfl::GetSurfaceFactoryOzone() {
23 return surface_factory_.get();
26 OverlayManagerOzone* OzonePlatformEfl::GetOverlayManager() {
27 return overlay_manager_.get();
30 CursorFactoryOzone* OzonePlatformEfl::GetCursorFactoryOzone() {
35 InputController* OzonePlatformEfl::GetInputController() {
40 GpuPlatformSupport* OzonePlatformEfl::GetGpuPlatformSupport() {
41 return gpu_platform_.get();
44 GpuPlatformSupportHost* OzonePlatformEfl::GetGpuPlatformSupportHost() {
45 return gpu_platform_host_.get();
48 scoped_ptr<SystemInputInjector> OzonePlatformEfl::CreateSystemInputInjector() {
53 scoped_ptr<PlatformWindow> OzonePlatformEfl::CreatePlatformWindow(
54 PlatformWindowDelegate* delegate,
55 const gfx::Rect& bounds) {
60 scoped_ptr<ui::NativeDisplayDelegate> OzonePlatformEfl::CreateNativeDisplayDelegate() {
65 base::ScopedFD OzonePlatformEfl::OpenClientNativePixmapDevice() const {
66 return base::ScopedFD();
69 void OzonePlatformEfl::InitializeUI() {
70 gpu_platform_host_.reset(CreateStubGpuPlatformSupportHost());
71 overlay_manager_.reset(new StubOverlayManager());
74 void OzonePlatformEfl::InitializeGPU() {
75 gpu_platform_.reset(CreateStubGpuPlatformSupport());
78 OzonePlatform* CreateOzonePlatformEfl() {
79 return new OzonePlatformEfl;