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

Side by Side Diff: gpu/ipc/service/gpu_init.h

Issue 2322123002: 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 unified diff | Download patch
« no previous file with comments | « gpu/ipc/service/BUILD.gn ('k') | gpu/ipc/service/gpu_init.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 GPU_IPC_SERVICE_GPU_INIT_H_
6 #define GPU_IPC_SERVICE_GPU_INIT_H_
7
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "gpu/config/gpu_info.h"
11 #include "gpu/gpu_export.h"
12
13 namespace base {
14 class CommandLine;
15 }
16
17 namespace gpu {
18
19 class GpuWatchdogThread;
20
21 class GPU_EXPORT GpuSandboxHelper {
22 public:
23 virtual ~GpuSandboxHelper() {}
24
25 virtual void PreSandboxStartup() = 0;
26
27 virtual bool EnsureSandboxInitialized() = 0;
28 };
29
30 class GPU_EXPORT GpuInit {
31 public:
32 GpuInit();
33 ~GpuInit();
34
35 void set_sandbox_helper(GpuSandboxHelper* helper) {
36 sandbox_helper_ = helper;
37 }
38
39 bool InitializeAndStartSandbox(const base::CommandLine& command_line);
40
41 const GPUInfo& gpu_info() const { return gpu_info_; }
42 GpuWatchdogThread* watchdog_thread() { return watchdog_thread_.get(); }
43
44 private:
45 GpuSandboxHelper* sandbox_helper_ = nullptr;
46 scoped_refptr<GpuWatchdogThread> watchdog_thread_;
47 GPUInfo gpu_info_;
48
49 DISALLOW_COPY_AND_ASSIGN(GpuInit);
50 };
51
52 } // namespace gpu
53
54 #endif // GPU_IPC_SERVICE_GPU_INIT_H_
OLDNEW
« no previous file with comments | « gpu/ipc/service/BUILD.gn ('k') | gpu/ipc/service/gpu_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698