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_GPU_IMPL_H_ | |
6 #define SERVICES_NATIVE_VIEWPORT_OZONE_DRM_GPU_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/gpu/drm_gpu_platform_support.h" | |
13 | |
14 namespace native_viewport { | |
15 | |
16 class OzoneDrmGpuImpl : public mojo::OzoneDrmGpu, | |
17 public ui::DrmGpuPlatformSupportDelegate { | |
18 public: | |
19 OzoneDrmGpuImpl(mojo::InterfaceRequest<mojo::OzoneDrmGpu> request, | |
20 const mojo::OzoneDrmHostPtr& ozone_drm_host); | |
21 ~OzoneDrmGpuImpl() override; | |
22 | |
23 // OzoneDrmGpu. | |
24 void CreateWindow(int64_t widget) override; | |
25 void WindowBoundsChanged(int64_t widget, mojo::RectPtr bounds) override; | |
26 | |
27 void AddGraphicsDevice(const mojo::String& file_path, | |
28 int32_t file_descriptor) override; | |
29 void RefreshNativeDisplays() override; | |
30 void ConfigureNativeDisplay(int64_t id, | |
31 mojo::DisplayModePtr mode, | |
32 mojo::PointPtr originhost) override; | |
33 | |
34 // DrmGpuPlatformSupportDelegate | |
35 void UpdateNativeDisplays( | |
36 const std::vector<ui::DisplaySnapshot_Params>& displays) override; | |
37 void DisplayConfigured(int64_t id, bool result) override; | |
38 | |
39 private: | |
40 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.
| |
41 ui::DrmGpuPlatformSupport* platform_support_; | |
42 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.
| |
43 | |
44 DISALLOW_COPY_AND_ASSIGN(OzoneDrmGpuImpl); | |
45 }; | |
46 | |
47 } // namespace native_viewport | |
48 | |
49 #endif // SERVICES_NATIVE_VIEWPORT_OZONE_DRM_GPU_IMPL_H_ | |
OLD | NEW |