Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1293)

Unified Diff: ui/ozone/platform/drm/mojo/drm_host_impl.cc

Issue 1309273005: native_viewport support for ozone (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: addressing review feedback Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698