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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 } | 67 } |
68 scoped_ptr<PlatformWindow> CreatePlatformWindow( | 68 scoped_ptr<PlatformWindow> CreatePlatformWindow( |
69 PlatformWindowDelegate* delegate, | 69 PlatformWindowDelegate* delegate, |
70 const gfx::Rect& bounds) override { | 70 const gfx::Rect& bounds) override { |
71 return make_scoped_ptr<PlatformWindow>( | 71 return make_scoped_ptr<PlatformWindow>( |
72 new PlatformWindowCast(delegate, bounds)); | 72 new PlatformWindowCast(delegate, bounds)); |
73 } | 73 } |
74 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { | 74 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { |
75 return make_scoped_ptr(new NativeDisplayDelegateOzone()); | 75 return make_scoped_ptr(new NativeDisplayDelegateOzone()); |
76 } | 76 } |
77 base::ScopedFD OpenClientNativePixmapDevice() const override { | |
78 return base::ScopedFD(); | |
79 } | |
80 | 77 |
81 void InitializeUI() override { | 78 void InitializeUI() override { |
82 overlay_manager_.reset(new OverlayManagerCast()); | 79 overlay_manager_.reset(new OverlayManagerCast()); |
83 cursor_factory_.reset(new CursorFactoryOzone()); | 80 cursor_factory_.reset(new CursorFactoryOzone()); |
84 input_controller_ = CreateStubInputController(); | 81 input_controller_ = CreateStubInputController(); |
85 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); | 82 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); |
86 | 83 |
87 // Enable dummy software rendering support if GPU process disabled | 84 // Enable dummy software rendering support if GPU process disabled |
88 // or if we're an audio-only build. | 85 // or if we're an audio-only build. |
89 // Note: switch is kDisableGpu from content/public/common/content_switches.h | 86 // Note: switch is kDisableGpu from content/public/common/content_switches.h |
(...skipping 27 matching lines...) Expand all Loading... |
117 | 114 |
118 OzonePlatform* CreateOzonePlatformCast() { | 115 OzonePlatform* CreateOzonePlatformCast() { |
119 const std::vector<std::string>& argv = | 116 const std::vector<std::string>& argv = |
120 base::CommandLine::ForCurrentProcess()->argv(); | 117 base::CommandLine::ForCurrentProcess()->argv(); |
121 scoped_ptr<chromecast::CastEglPlatform> platform( | 118 scoped_ptr<chromecast::CastEglPlatform> platform( |
122 chromecast::CastEglPlatformShlib::Create(argv)); | 119 chromecast::CastEglPlatformShlib::Create(argv)); |
123 return new OzonePlatformCast(std::move(platform)); | 120 return new OzonePlatformCast(std::move(platform)); |
124 } | 121 } |
125 | 122 |
126 } // namespace ui | 123 } // namespace ui |
OLD | NEW |