OLD | NEW |
| (Empty) |
1 // Copyright 2016 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_UI_GPU_GPU_MAIN_H_ | |
6 #define SERVICES_UI_GPU_GPU_MAIN_H_ | |
7 | |
8 #include "gpu/ipc/service/gpu_init.h" | |
9 #include "services/ui/gpu/interfaces/gpu_service_internal.mojom.h" | |
10 | |
11 namespace gpu { | |
12 class GpuMemoryBufferFactory; | |
13 } | |
14 | |
15 namespace ui { | |
16 | |
17 class GpuServiceInternal; | |
18 | |
19 class GpuMain : public gpu::GpuSandboxHelper { | |
20 public: | |
21 GpuMain(); | |
22 ~GpuMain() override; | |
23 | |
24 void Add(mojom::GpuServiceInternalRequest request); | |
25 | |
26 GpuServiceInternal* gpu_service() { return gpu_service_internal_.get(); } | |
27 | |
28 private: | |
29 // gpu::GpuSandboxHelper: | |
30 void PreSandboxStartup() override; | |
31 bool EnsureSandboxInitialized() override; | |
32 | |
33 std::unique_ptr<GpuServiceInternal> gpu_service_internal_; | |
34 gpu::GpuInit gpu_init_; | |
35 std::unique_ptr<gpu::GpuMemoryBufferFactory> gpu_memory_buffer_factory_; | |
36 | |
37 DISALLOW_COPY_AND_ASSIGN(GpuMain); | |
38 }; | |
39 | |
40 } // namespace ui | |
41 | |
42 #endif // SERVICES_UI_GPU_GPU_MAIN_H_ | |
OLD | NEW |