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

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: rebased 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
« no previous file with comments | « ui/ozone/platform/drm/mojo/drm_host_impl.h ('k') | ui/ozone/platform/drm/mojo/drm_ipc_init_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..315369d7f27cbdfa44b5cc7647963a15bc3eece3
--- /dev/null
+++ b/ui/ozone/platform/drm/mojo/drm_host_impl.cc
@@ -0,0 +1,36 @@
+// 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 "mojo/converters/ozone_drm_gpu/ozone_drm_gpu_type_converters.h"
+#include "ui/ozone/public/ozone_platform.h"
+
+namespace ui {
+
+static const int kFakeProcessId = -1;
+
+MojoDrmHostImpl::MojoDrmHostImpl(
+ mojo::InterfaceRequest<mojo::OzoneDrmHost> request)
+ : platform_support_(static_cast<ui::DrmGpuPlatformSupportHost*>(
+ ui::OzonePlatform::GetInstance()
+ ->GetGpuPlatformSupportHost())),
+ binding_(this, request.Pass()) {
+ platform_support_->OnChannelEstablished(kFakeProcessId);
+}
+
+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
« no previous file with comments | « ui/ozone/platform/drm/mojo/drm_host_impl.h ('k') | ui/ozone/platform/drm/mojo/drm_ipc_init_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698