Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Unified Diff: services/ui/gpu/gpu_main.h

Issue 2289553002: gpu: Introduce GpuInit. (Closed)
Patch Set: . Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/gpu/BUILD.gn ('k') | services/ui/gpu/gpu_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « services/ui/gpu/BUILD.gn ('k') | services/ui/gpu/gpu_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698