OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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/cast/ozone_platform_cast.h" | 5 #include "ui/ozone/platform/cast/ozone_platform_cast.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_descriptor_posix.h" |
8 #include "chromecast/public/cast_egl_platform.h" | 9 #include "chromecast/public/cast_egl_platform.h" |
9 #include "chromecast/public/cast_egl_platform_shlib.h" | 10 #include "chromecast/public/cast_egl_platform_shlib.h" |
10 #include "ui/ozone/common/native_display_delegate_ozone.h" | 11 #include "ui/ozone/common/native_display_delegate_ozone.h" |
11 #include "ui/ozone/platform/cast/gpu_platform_support_cast.h" | 12 #include "ui/ozone/platform/cast/gpu_platform_support_cast.h" |
12 #include "ui/ozone/platform/cast/overlay_manager_cast.h" | 13 #include "ui/ozone/platform/cast/overlay_manager_cast.h" |
13 #include "ui/ozone/platform/cast/platform_window_cast.h" | 14 #include "ui/ozone/platform/cast/platform_window_cast.h" |
14 #include "ui/ozone/platform/cast/surface_factory_cast.h" | 15 #include "ui/ozone/platform/cast/surface_factory_cast.h" |
15 #include "ui/ozone/public/cursor_factory_ozone.h" | 16 #include "ui/ozone/public/cursor_factory_ozone.h" |
16 #include "ui/ozone/public/gpu_platform_support_host.h" | 17 #include "ui/ozone/public/gpu_platform_support_host.h" |
17 #include "ui/ozone/public/input_controller.h" | 18 #include "ui/ozone/public/input_controller.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 scoped_ptr<PlatformWindow> CreatePlatformWindow( | 62 scoped_ptr<PlatformWindow> CreatePlatformWindow( |
62 PlatformWindowDelegate* delegate, | 63 PlatformWindowDelegate* delegate, |
63 const gfx::Rect& bounds) override { | 64 const gfx::Rect& bounds) override { |
64 return make_scoped_ptr<PlatformWindow>( | 65 return make_scoped_ptr<PlatformWindow>( |
65 new PlatformWindowCast(delegate, bounds)); | 66 new PlatformWindowCast(delegate, bounds)); |
66 } | 67 } |
67 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { | 68 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { |
68 return make_scoped_ptr(new NativeDisplayDelegateOzone()); | 69 return make_scoped_ptr(new NativeDisplayDelegateOzone()); |
69 } | 70 } |
70 | 71 |
| 72 base::FileDescriptor GetVirtualDeviceFd() override { |
| 73 return base::FileDescriptor(); |
| 74 } |
| 75 |
71 void InitializeUI() override { | 76 void InitializeUI() override { |
72 overlay_manager_.reset(new OverlayManagerCast()); | 77 overlay_manager_.reset(new OverlayManagerCast()); |
73 cursor_factory_.reset(new CursorFactoryOzone()); | 78 cursor_factory_.reset(new CursorFactoryOzone()); |
74 input_controller_ = CreateStubInputController(); | 79 input_controller_ = CreateStubInputController(); |
75 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); | 80 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); |
76 } | 81 } |
77 void InitializeGPU() override { | 82 void InitializeGPU() override { |
78 surface_factory_.reset(new SurfaceFactoryCast(egl_platform_.Pass())); | 83 surface_factory_.reset(new SurfaceFactoryCast(egl_platform_.Pass())); |
79 gpu_platform_support_.reset( | 84 gpu_platform_support_.reset( |
80 new GpuPlatformSupportCast(surface_factory_.get())); | 85 new GpuPlatformSupportCast(surface_factory_.get())); |
(...skipping 15 matching lines...) Expand all Loading... |
96 | 101 |
97 OzonePlatform* CreateOzonePlatformCast() { | 102 OzonePlatform* CreateOzonePlatformCast() { |
98 const std::vector<std::string>& argv = | 103 const std::vector<std::string>& argv = |
99 base::CommandLine::ForCurrentProcess()->argv(); | 104 base::CommandLine::ForCurrentProcess()->argv(); |
100 scoped_ptr<chromecast::CastEglPlatform> platform( | 105 scoped_ptr<chromecast::CastEglPlatform> platform( |
101 chromecast::CastEglPlatformShlib::Create(argv)); | 106 chromecast::CastEglPlatformShlib::Create(argv)); |
102 return new OzonePlatformCast(platform.Pass()); | 107 return new OzonePlatformCast(platform.Pass()); |
103 } | 108 } |
104 | 109 |
105 } // namespace ui | 110 } // namespace ui |
OLD | NEW |