Chromium Code Reviews| Index: ui/ozone/platform/drm/mojo/drm_host_impl.cc |
| diff --git a/ui/ozone/platform/drm/mojo/drm_host_impl.cc b/ui/ozone/platform/drm/mojo/drm_host_impl.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b7643fcaef1930a81d300c67607dc742c0bcf8ff |
| --- /dev/null |
| +++ b/ui/ozone/platform/drm/mojo/drm_host_impl.cc |
| @@ -0,0 +1,35 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "ui/ozone/platform/drm/mojo/drm_host_impl.h" |
| + |
| +#include "base/logging.h" |
| +#include "base/process/process.h" |
| +#include "mojo/converters/ozone_drm_gpu/ozone_drm_gpu_type_converters.h" |
| +#include "ui/ozone/public/ozone_platform.h" |
| + |
| +namespace ui { |
| + |
| +MojoDrmHostImpl::MojoDrmHostImpl( |
| + mojo::InterfaceRequest<mojo::OzoneDrmHost> request) |
| + : platform_support_(static_cast<ui::DrmGpuPlatformSupportHost*>( |
| + ui::OzonePlatform::GetInstance() |
| + ->GetGpuPlatformSupportHost())), |
| + binding_(this, request.Pass()) { |
| + platform_support_->OnChannelEstablished(base::Process::Current().Pid()); |
|
jamesr
2015/08/27 19:35:47
does this need the actual pid? what does it use it
cdotstout
2015/08/27 21:28:33
Some ipc mechanisms may need it. Drm/mojo doesn't
spang
2015/08/28 19:38:20
The number is used for handling GPU process restar
|
| +} |
| + |
| +MojoDrmHostImpl::~MojoDrmHostImpl() {} |
| + |
| +void MojoDrmHostImpl::UpdateNativeDisplays( |
| + mojo::Array<mojo::DisplaySnapshotPtr> displays) { |
| + platform_support_->get_display_manager()->OnUpdateNativeDisplays( |
| + displays.To<std::vector<ui::DisplaySnapshot_Params>>()); |
| +} |
| + |
| +void MojoDrmHostImpl::DisplayConfigured(int64_t id, bool result) { |
| + platform_support_->get_display_manager()->OnDisplayConfigured(id, result); |
| +} |
| + |
| +} // namespace ui |