Index: services/ui/gpu/gpu_main.h |
diff --git a/services/ui/gpu/gpu_main.h b/services/ui/gpu/gpu_main.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c200febc08e88b4ba858814fd159a86b7f569799 |
--- /dev/null |
+++ b/services/ui/gpu/gpu_main.h |
@@ -0,0 +1,54 @@ |
+// Copyright 2016 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_UI_GPU_GPU_MAIN_H_ |
+#define SERVICES_UI_GPU_GPU_MAIN_H_ |
+ |
+#include "gpu/config/gpu_info.h" |
+#include "gpu/ipc/service/gpu_init.h" |
+#include "gpu/ipc/service/gpu_init_delegate.h" |
+#include "services/ui/gpu/interfaces/gpu_service_internal.mojom.h" |
+ |
+namespace ui { |
+ |
+class GpuServiceInternal; |
+ |
+class GpuMain : public gpu::GpuInitDelegate { |
+ public: |
+ GpuMain(); |
+ ~GpuMain() override; |
+ |
+ void Add(mojom::GpuServiceInternalRequest request); |
+ |
+ GpuServiceInternal* gpu_service() { return gpu_service_internal_.get(); } |
+ |
+ private: |
+ // gpu::GpuInit::Delegate: |
+ void OnGpuInfoUpdate(const gpu::GPUInfo& info) override; |
+ void OnGpuWatchdogThreadCreated(gpu::GpuWatchdogThread* thread) override; |
+ void OnGpuWatchdogThreadDestroyed() override; |
+ |
+ bool ShouldInitializeGL() override; |
+ void WaitForDebugger() override; |
+ void PreSandboxInitialization() override; |
+ bool ShouldStartSandboxEarly() override; |
+ void WarmUpSandbox() override; |
+ bool StartSandbox() override; |
+ void InitializeMessageLoop() override; |
+ void Initialize(base::Time start_time, |
+ bool dead_on_arrival, |
+ std::vector<gpu::GpuInitLogMessage> int_log_messages, |
+ gpu::GpuMemoryBufferFactory* gpu_buffer_factory) override; |
+ |
+ std::unique_ptr<GpuServiceInternal> gpu_service_internal_; |
+ gpu::GPUInfo gpu_info_; |
+ gpu::GpuWatchdogThread* watchdog_thread_ = nullptr; |
+ gpu::GpuInit gpu_init_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(GpuMain); |
+}; |
+ |
+} // namespace ui |
+ |
+#endif // SERVICES_UI_GPU_GPU_MAIN_H_ |