OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SERVICES_NATIVE_VIEWPORT_OZONE_DRM_HOST_IMPL_H_ |
| 6 #define SERVICES_NATIVE_VIEWPORT_OZONE_DRM_HOST_IMPL_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 10 #include "mojo/services/ozone_drm_gpu/public/interfaces/ozone_drm_gpu.mojom.h" |
| 11 #include "mojo/services/ozone_drm_host/public/interfaces/ozone_drm_host.mojom.h" |
| 12 #include "ui/ozone/platform/drm/host/drm_gpu_platform_support_host.h" |
| 13 |
| 14 namespace native_viewport { |
| 15 |
| 16 class OzoneDrmHostImpl : public mojo::OzoneDrmHost, |
| 17 public ui::DrmGpuPlatformSupportHostDelegate { |
| 18 public: |
| 19 OzoneDrmHostImpl(mojo::InterfaceRequest<mojo::OzoneDrmHost> request, |
| 20 const mojo::OzoneDrmGpuPtr& ozone_drm_gpu); |
| 21 ~OzoneDrmHostImpl() override; |
| 22 |
| 23 // OzoneDrmHost |
| 24 void UpdateNativeDisplays( |
| 25 mojo::Array<mojo::DisplaySnapshotPtr> displays) override; |
| 26 void DisplayConfigured(int64_t id, bool result) override; |
| 27 |
| 28 // DrmGpuPlatformSupportHostDelegate. |
| 29 void CreateWindow(const gfx::AcceleratedWidget& widget) override; |
| 30 void WindowBoundsChanged(const gfx::AcceleratedWidget& widget, |
| 31 const gfx::Rect& bounds) override; |
| 32 void AddGraphicsDevice(const base::FilePath& path, |
| 33 const base::FileDescriptor& fd) override; |
| 34 bool RefreshNativeDisplays() override; |
| 35 bool ConfigureNativeDisplay(int64_t id, |
| 36 const ui::DisplayMode_Params& mode, |
| 37 const gfx::Point& originhost) override; |
| 38 |
| 39 private: |
| 40 mojo::StrongBinding<mojo::OzoneDrmHost> binding_; |
| 41 const mojo::OzoneDrmGpuPtr& ozone_drm_gpu_; |
| 42 ui::DrmGpuPlatformSupportHost* platform_support_; |
| 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(OzoneDrmHostImpl); |
| 45 }; |
| 46 |
| 47 } // namespace |
| 48 |
| 49 #endif // SERVICES_NATIVE_VIEWPORT_OZONE_DRM_HOST_IMPL_H_ |
OLD | NEW |