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_ |