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

Unified Diff: services/native_viewport/ozone/ozone_drm_gpu_impl.h

Issue 1309273005: native_viewport support for ozone (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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: services/native_viewport/ozone/ozone_drm_gpu_impl.h
diff --git a/services/native_viewport/ozone/ozone_drm_gpu_impl.h b/services/native_viewport/ozone/ozone_drm_gpu_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..79feb894ad7d3c9f5df9c9f7b26d4a803cf7a1a2
--- /dev/null
+++ b/services/native_viewport/ozone/ozone_drm_gpu_impl.h
@@ -0,0 +1,49 @@
+// 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.
+
+#ifndef SERVICES_NATIVE_VIEWPORT_OZONE_DRM_GPU_IMPL_H_
+#define SERVICES_NATIVE_VIEWPORT_OZONE_DRM_GPU_IMPL_H_
+
+#include "base/macros.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
+#include "mojo/services/ozone_drm_gpu/public/interfaces/ozone_drm_gpu.mojom.h"
+#include "mojo/services/ozone_drm_host/public/interfaces/ozone_drm_host.mojom.h"
+#include "ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h"
+
+namespace native_viewport {
+
+class OzoneDrmGpuImpl : public mojo::OzoneDrmGpu,
+ public ui::DrmGpuPlatformSupportDelegate {
+ public:
+ OzoneDrmGpuImpl(mojo::InterfaceRequest<mojo::OzoneDrmGpu> request,
+ const mojo::OzoneDrmHostPtr& ozone_drm_host);
+ ~OzoneDrmGpuImpl() override;
+
+ // OzoneDrmGpu.
+ void CreateWindow(int64_t widget) override;
+ void WindowBoundsChanged(int64_t widget, mojo::RectPtr bounds) override;
+
+ void AddGraphicsDevice(const mojo::String& file_path,
+ int32_t file_descriptor) override;
+ void RefreshNativeDisplays() override;
+ void ConfigureNativeDisplay(int64_t id,
+ mojo::DisplayModePtr mode,
+ mojo::PointPtr originhost) override;
+
+ // DrmGpuPlatformSupportDelegate
+ void UpdateNativeDisplays(
+ const std::vector<ui::DisplaySnapshot_Params>& displays) override;
+ void DisplayConfigured(int64_t id, bool result) override;
+
+ private:
+ mojo::StrongBinding<mojo::OzoneDrmGpu> binding_;
jamesr 2015/08/25 00:30:28 nit: put the StrongBinding last
cdotstout 2015/08/27 19:10:21 Done.
+ ui::DrmGpuPlatformSupport* platform_support_;
+ const mojo::OzoneDrmHostPtr& ozone_drm_host_;
jamesr 2015/08/25 00:30:28 const ref to a Ptr is odd. if you don't have an ow
cdotstout 2015/08/27 19:10:21 Done.
+
+ DISALLOW_COPY_AND_ASSIGN(OzoneDrmGpuImpl);
+};
+
+} // namespace native_viewport
+
+#endif // SERVICES_NATIVE_VIEWPORT_OZONE_DRM_GPU_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698