OLD | NEW |
(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 "ui/ozone/platform/drm/mojo/drm_host_impl.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 #include "mojo/converters/ozone_drm_gpu/ozone_drm_gpu_type_converters.h" |
| 9 #include "ui/ozone/public/ozone_platform.h" |
| 10 |
| 11 namespace ui { |
| 12 |
| 13 static const int kFakeProcessId = -1; |
| 14 |
| 15 MojoDrmHostImpl::MojoDrmHostImpl( |
| 16 mojo::InterfaceRequest<mojo::OzoneDrmHost> request) |
| 17 : platform_support_(static_cast<ui::DrmGpuPlatformSupportHost*>( |
| 18 ui::OzonePlatform::GetInstance() |
| 19 ->GetGpuPlatformSupportHost())), |
| 20 binding_(this, request.Pass()) { |
| 21 platform_support_->OnChannelEstablished(kFakeProcessId); |
| 22 } |
| 23 |
| 24 MojoDrmHostImpl::~MojoDrmHostImpl() {} |
| 25 |
| 26 void MojoDrmHostImpl::UpdateNativeDisplays( |
| 27 mojo::Array<mojo::DisplaySnapshotPtr> displays) { |
| 28 platform_support_->get_display_manager()->OnUpdateNativeDisplays( |
| 29 displays.To<std::vector<ui::DisplaySnapshot_Params>>()); |
| 30 } |
| 31 |
| 32 void MojoDrmHostImpl::DisplayConfigured(int64_t id, bool result) { |
| 33 platform_support_->get_display_manager()->OnDisplayConfigured(id, result); |
| 34 } |
| 35 |
| 36 } // namespace ui |
OLD | NEW |